Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;// \ ||
- int main ()
- {
- int n,i=1,a=0,b,lg=0,lgmax=0;
- cout<<"nr note=";cin>>n;
- cout<<"intodu notele=";
- while (i<=n)
- {
- cin>>b;
- if (a<=b)
- lg++;
- else
- {
- if (lgmax<lg)
- lgmax=lg;
- lg=1;
- }
- a=b;
- i++;
- }
- if (lgmax<lg)
- lgmax=lg;
- cout<<"lgmax="<<lgmax;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement