
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
it is very useful for practicing c programming for students
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!

#include <stdio.h> int main() { int n,d=1,i; int t; scanf("%d",&n); t=n%1000; printf("%d\n",t); for(i=1;i<=10000 & d!=0;i=i100) { d=(n/(1000i))%100; if(d==0) break; printf("%d\n",d); } return 0; }