View Code of Problem 77

#include<stdio.h>
#include<math.h>
int main(){
	int x;
	scanf("%d",&x);
	int i;
	for(i = 4; i > 0; i --){
		int t = pow(10,i - 1);
		if(i == 1){
			printf("%d\n",x/t);
		}else{
			printf("%d ",x/t);
		}
		x = x % t;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 77