Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. { // This programm only reverse the numbers
  4. int num,rem,i,count;
  5. printf("Enter the number of digits in the number you want to revere :");
  6. scanf("%i",&count);
  7. printf("Enter the number :");
  8. scanf("%i",&num);
  9. rem=num;
  10. for(i=1;i<=count;i++)
  11. {
  12. num=rem%10;
  13. rem/=10;
  14. printf("%i",num);
  15. }
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement