Exercise • Write a program that asks the user -Do you want to use this program? (y/n) • If the user says 'y' then the program terminates • If the user says 'n' then the program asks -Are you really sure you do not want to use this program? (y/n) -If the user says 'n' it terminates, otherwise it prints I again the message -Are you really really sure you do not want to use this program? (y/n) And so on, every time adding one more "really".

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.6: Nested Loops
Problem 2E
icon
Related questions
Question

EXERCISE 1

Based on the image attached, use the C++ language to solve the coding. Thank you in advance.

Exercise
Write a program that asks the user
-Do you want to use this program? (y/n)
• If the user says 'y' then the program terminates
If the user says 'n' then the program asks
-Are you really sure you do not want to use
this program? (y/n)
If the user says 'n' it terminates, otherwise it prints I
again the message
- Are you really really sure you do not want
to use this program? (y/n)
And so on, every time adding one more "really".
Transcribed Image Text:Exercise Write a program that asks the user -Do you want to use this program? (y/n) • If the user says 'y' then the program terminates If the user says 'n' then the program asks -Are you really sure you do not want to use this program? (y/n) If the user says 'n' it terminates, otherwise it prints I again the message - Are you really really sure you do not want to use this program? (y/n) And so on, every time adding one more "really".
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning