Question: 1. Write a C++ program that will read in any positive integer value (not string) and print the digits out in reverse order. Examples: Input

1. Write a C++ program that will read in any positive integer value (not string) and print the digits out in reverse order. Examples:

Input a positive integer: 1234

Reversed: 4321

Input a positive integer: 1

Reversed: 1

Input a positive integer: 624578

Reversed: 875426

-------------------------------------------------------------------------------------------------------------------------------------------

2. Rewrite the following while loop as an equivalent for loop.

int i = 1;

int total = 0;

while( i < 100 )

{

total += i;

i++;

}

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!