Question: Write a C++ program that asks the user for a positive non-zero number. The program terminates if the input is invalid. The program prints out

Write a C++ program that asks the user for a positive non-zero number. The program terminates if the input is invalid. The program prints out the reverse of the user input, with a 0 between each digit, and adds 1 to all even digits. ex: Please enter a positive number: 4324 Reverse to odd with 0 in between: 5030305 ex: Please enter a positive number: 54321 Reverse to odd with 0 in between: 103030505 ex: Please enter a positive number: 8 Reverse to odd with 0 in between: 9 ex: Please enter a positive number: 7 Reverse to odd with 0 in between: 7 Please only use " #include  " 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!