Advertisement
Guest User

Untitled

a guest
May 21st, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int n, numere[501], contor, ordonat;
  6.  
  7. int main(){
  8.  
  9.     cin>>n;
  10.  
  11.     for (contor = 1;contor<=n;contor++){
  12.  
  13.         cin>>numere[contor];
  14.  
  15.     }
  16.  
  17.     for (contor = 1;contor<n;contor++) if (numere[contor] > numere[contor + 1]){ ordonat = 1; break;}
  18.  
  19.     if (ordonat == 1) cout<<"NU";
  20.  
  21.     else cout<<"DA";
  22.  
  23.     return 0;
  24.  
  25. }
  26.  
  27. Citește mai multe pe Brainly.ro - https://brainly.ro/tema/3642063#readmore
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement