77 961
Assignments Done
Successfully Done
In August 2019

Answer to Question #24355 in C++ for Aaron Stewart

Question #24355
write compile and run a c++ program to reverse the digits of a positive integer number. For example if the number 8735 is entered, the number displayed should be 5378.( hint: use do while ) After a units digit is displayed, dividing the number by 10 sets up the number for the next iteration
Expert's answer
#include <iostream>
using namespace std;

int main()


int num, rev;

cout <<"Input: ";
cin >> num;

cout <<"Output: ";

rev = num;
cout << rev;
} while(num>0);

cout <<"

return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions