Guest User

Untitled

a guest
Dec 14th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. main(){
  4. int N,d=1,i;
  5. do{
  6. printf ("Nhap so nguyen duong N: ");
  7. scanf ("%d",&N);
  8. }
  9. while(N<=0);
  10.  
  11. while (N!=0){
  12. i=N%10;
  13. N=N/10;
  14. if((N!=0)&&(i>N%10)){
  15. d=0;
  16. break;
  17. }
  18. }
  19. if(d==1)
  20. printf ("\nSo vua nhap la so lui");
  21. else
  22. printf ("\nSo vua nhap khong la so lui");
  23. }
Add Comment
Please, Sign In to add comment