Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
295 B
2
Indexable
Never
#include <iostream>
using namespace std;
int main() {
	int a, b, c, d, f,t ;
	cin >> a;
	t = a;
	b = a;
	f = a;
	c = 0;
	while (b!=0)
	{
		b /= 10;
		c += 1;
	}
	while (f!=0)
	{ 
		a = t;
		c -= 1;
		f /= 10;
		d = pow(10,c);
		a = a / d % 10;
		cout << a << " ";
	}
}