Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- bool monotonicznosc(int T[],int n)
- {
- for(int i=0;i<n-1;i++)
- {
- if(T[i]<=T[i+1])return false;
- }
- return true;
- }
- int main()
- {
- int n;
- cout<<"Podaj n: ";cin>>n;
- int T[n];
- for(int i=0;i<n;i++)
- {
- cin>>T[i];
- }
- if(monotonicznosc(T,n)==true)cout<<"Tak";
- else cout<<"Nie";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement