bool answer;
cout << "Is it time for your child to go to sleep: \n";
cout << "Please enter 1 for yes and 0 for no. \n";
cin >> answer;
displayTime(answer); // This will just display the current date/time
cout << "Let get ready to take a nap" << endl;
return 0;
}
void displayTime(bool myAnswer){
if(myAnswer == 1){
time_t now;
time(&now);
cout << "Current time is: " << ctime(&now);
}
else(myAnswer == 0);
{
cout << "We will check back later " << endl;
break; I would like the program to stop here, go no further
}
}