Untitled

Anonymous
plain_text
10/23/2022 12:07 PM
412 B
11
Indexable
#include <iostream>
using namespace std;
int main() {
	int a, b, c, d, f;
	cin>> a;
	b = a;
	f = a;
	c = 0;
	while (b != 0)
	{
		b /= 10;
		c += 1;
	}
	int temp = a;
	while (f != 0)
	{
		a = temp;
		c -= 1;
		f /= 10;
		d = pow(10, c );
		a /= d;
		a %= 10;
		cout<< a<<" ";
	}
}

Editor is loading...