fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n = 123;
  7. cout << "Valor inicial:" << n << endl;
  8. cout << "Valor Inverso:" << n % 100 % 10 << n % 100 / 10 << n / 100;
  9. }
Success #stdin #stdout 0s 5556KB
stdin
Standard input is empty
stdout
Valor inicial:123
Valor Inverso:321