Untitled

Anonymous
c_cpp
10/15/2023 10:20 AM
360 B
11
Indexable
#include <iostream>
using namespace std;

int main() {
	int a;
	int b = 0;
	cin >> a;

	if (a == 0) {
		cout << 0;
	}

	while (a > 0) {
		b += a % 10;
		b *= 10;
		a /= 10;
	}
	b /= 10;

	while (b > 0) {
		cout << b % 10 << endl;
		b /= 10;
	}
}
Editor is loading...