SOURCE FILE: 040_catORnothing.cpp
/* This program illustrates that it's possible to use a compound statement
as the YES option of an if-statement.
Also it illustrates the use of a char variable, here to store the
response of the user.
*/
#include <iostream>
using namespace std ;
int main (void)
{
char response ;
cout << "\nI can draw a cat for you - or not.\n" ;
cout << "Which would you like to see?\n\n" ;
cout << "Enter 'c' for cat or 'n' for nothing: " ;
cin >> response ;
if (response == 'c')
{
cout << " /\\_/\\\n" ;
cout << " ____/ o o \\\n" ;
cout << " /~____ =*= /\n" ;
cout << " (______)__m_m)\n" ;
}
cout << endl ;
cout << "Thanks for using this program.\n\n" ;
return 0;
}