Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

the program below is supposed to input a number of 3 digits fromthe user and out

ID: 3616770 • Letter: T

Question

the program below is supposed to input a number of 3 digits fromthe user and output its digits backwards. I.e., 123 as input wouldbe displayed as 321. it says, Do Not usestrings for this program. think about integer arithmeticoperators like division and modulus.

#include <iostream>
using namespace std;
int main ()
{
   int num; // the input number
   int d1, d2, d3; // the digits
   cout << "Enter a 3 digit number ";
   cin >> num;
   cout << "Your number is " << num<< endl;
   d1 = num/100;
   num = num ;
   d2 = num/10;
   d3 = num%10;

   cout << "The number reversed is " <<d3 << d2 << d1 << endl;
   return 0;
}

Thank you

Explanation / Answer

please rate - thanks using your code --you were almost there! #include using namespace std; int main () {     int num; // the input number     int d1, d2, d3; // the digits     cout > num;     cout