View Code of Problem 77

#include <stdio.h>
using namespace std;
int main(){
	int n;
	scanf("%d", &n );
	int mask = 1000;
	while( mask > 0 ){
		int d = n/mask;
		printf("%d", d );
		n = n%mask;
		mask = mask/10;
		if( mask > 0 ){
			printf(" ");
		}
	}

	return 0;
	
}

Double click to view unformatted code.


Back to problem 77