You are on page 1of 1

#include <iostream>

using namespace std;

int main() {
int n;
int r;
int c;
int reversedNumber = 0;

cout << "Introduceti un numar: ";


cin >> n;

while (n != 0) {
r = n % 10;
c = n / 10;
cout << r << endl;
n = c;

}
return 0;
}

You might also like