Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- const int n = 10;
- int a[n] = { 1,2,3,4,5,6,7,8,9,10 };
- bool b = true;
- for (int i = 1; i<n&&b; i++)
- {
- if (a[i]>a[i - 1])
- b=false;
- }
- if (b)
- cout << "Massiv ubivaet" << endl;
- bool q = true;
- for (int i = 1; i<n&&q; i++)
- {
- if (a[i]<a[i - 1])
- q = false;
- }
- if (q)
- cout << "Massiv vozrastaet" << endl;
- system("pause");
- return 0;;
- }
Advertisement
Add Comment
Please, Sign In to add comment