Advertisement
Polnochniy

Untitled

Nov 21st, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. const int N = 7;
  4. using namespace std;
  5. int main()
  6. {
  7. setlocale(LC_ALL, "Rus");
  8. int a[N], i;
  9. int c;
  10. cout << "Введите элементы массива . Вывести элементы ,которые больше предыдушего " << endl;
  11. for (i = 0; i < N; i++)
  12. {
  13. cin >> a[i];
  14. }
  15. for (int i = 1; i < N; i++)
  16. {
  17. if (a[i] > a[i - 1])
  18. {
  19. cout << a[i] << " ";
  20. }
  21. }
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement