// Justin C. Miller
// University of Wisconsin Oshkosh
// Made for: http://www.geocities.com/neonprimetime.geo/index.html
// Date: 2001
// Borland Builder 4.0
#include
bool Yes() ;
int main()
{
cout << "Would you like to go out to eat?" << endl ;
if(Yes())
cout << "Sounds Good!" << endl ;
else
cout << "OK, maybe next time." << endl ;
return 0 ;
}
bool Yes()
{
char x[2] ;
while(true)
{
cout << "Please enter (y) for yes or (n) for no:" << endl ;
cin >> x ;
if(x[1] == '\0')
if(x[0] == 'y' || x[0] == 'Y' || x[0] == 'n' || x[0] == 'N')
if(x[0] == 'y' || x[0] == 'Y')
return true ;
else return false ;
cout << "Error! " ;
}
}
               (
geocities.com/neonprimetime.geo/cpp)                   (
geocities.com/neonprimetime.geo)