View Code of Problem 77

#include<stdio.h>
#include<stdlib.h>

int main(){
	int a,b,c,d,X;
	scanf("%d",&X);
	a=X/1000;
	b=X/100-10*a;
	c=X/10-100*a-10*b;
	d=X-1000*a-100*b-10*c;
	printf("%d %d %d %d",a,b,c,d);
}

Double click to view unformatted code.


Back to problem 77