Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<conio.h>
- void main()
- {
- int n,i,r=0;
- clrscr();
- printf("Enter a 5 digit num");
- scanf("%i",&n);
- for(i=1;i<6;i++)
- {
- r=r+n%10;
- n=n/10;
- }
- printf("%i",n);
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement