Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n,i;
  6. cin>>n;
  7. i=0;
  8. while(n>9)
  9. {
  10. if(n/10%10<=n%10)
  11. {
  12. i=1;
  13. }
  14. n=n/10;
  15. }
  16. if(i==0)
  17. {
  18. cout<<"Cifrele sunt in ordine descrescatoare";
  19. }
  20. else
  21. {
  22. cout<<"Cifrele nu sunt in ordine descrescatoare";
  23. }
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement