C++ problem

I need assistance with writing this program.

Write this program while the user response is ‘y’ or ‘Y’

-prompt the user to enter a number

- If the number is > 0, print out the number with an appropriate message

- else if the number is < 0, print out the number with an appropriate message

- else print the number and the appropriate message

- ask the user if they wish to continue

- if the user enters anything other than ‘y’ or ‘Y’ print a message that says Thank You and exit the program

- if the user wishes to continue, continue the loop

Hint: char response = ‘y’; // so the loop will execute at least once
my hint is that your hint is bad lol.
1
2
3
4
5
6
7
8
char response; //don't need initial value, though its always recommended to have one
do
{
   stuff
   cin >> response;
   things
}
while(response == 'y' || response == 'Y')


give it a try. ask a question, so some effort and we will help.
Topic archived. No new replies allowed.