Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n, flag1 = 0, flag2 = 0;
- cin >> n;
- int s[n];
- for(int i = 0; i < n; i++) {
- cin >> s[i];
- }
- for (int i = 1; i < n; i++) {
- if(s[i] >= s[i-1]) {
- flag1++;
- }
- if(s[i] <= s[i-1]) {
- flag2++;
- }
- }
- if(flag1 == n-1 && flag2 == n-1) {
- cout << "vse ravni";
- }
- else if(flag1 == n-1) {
- cout << "vozrastaet";
- }
- else if(flag2 == n-1) {
- cout << "ybivaet";
- }
- else{
- cout << "neuporydacheno";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement