Advertisement
nguyenhappy92

Hiển thị các chữ số của một số tự nhiên n theo thứ tự từ phả

Oct 16th, 2015
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. // Hien thij chu so nguyen duong tu phai qua trai
  2. // Khai bao cca ham thu vien neu co
  3. #include<stdio.h>
  4. #include<conio.h>
  5.  
  6. void main()
  7. {
  8. int n;
  9. scanf("%d",&n);
  10. int a;
  11. while(n!=0)
  12. {
  13. a=n%10;
  14. printf("%d\t",a);
  15. n=n/10;
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement