Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- const int N = 7;
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Rus");
- int a[N], i;
- int c;
- cout << "Введите элементы массива . Вывести элементы ,которые больше предыдушего " << endl;
- for (i = 0; i < N; i++)
- {
- cin >> a[i];
- }
- for (int i = 1; i < N; i++)
- {
- if (a[i] > a[i - 1])
- {
- cout << a[i] << " ";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement