View Code of Problem 77

#include<bits/stdc++.h>
using namespace std;
int main() {
	int n, arr[5],count=0;
	cin>>n;
	while(n) {
		arr[count++]=n%10;
		n/=10;
	}
	for(int i=3; i>=0; i--) cout<<arr[i]<<" ";
}	

Double click to view unformatted code.


Back to problem 77