Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int n,i;
- cin>>n;
- i=0;
- while(n>9)
- {
- if(n/10%10<=n%10)
- {
- i=1;
- }
- n=n/10;
- }
- if(i==0)
- {
- cout<<"Cifrele sunt in ordine descrescatoare";
- }
- else
- {
- cout<<"Cifrele nu sunt in ordine descrescatoare";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement