#include <iostream>
using namespace std;
int main() {
double x, n, p;
int kol = 0;
cout << "Enter col numbers in sequence";
cin >> n;
cout << "Enter number";
cin >> p;
for(int a = 2; a <= n; a++) {
cout << "Enter " << a << " number";
cin >> x;
if (n > 1 && x > p) {
kol++;
p = x;
}
cout << "kol = " << kol;
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main() {
double x, n, p;
int kol = 0;
cout << "Enter col numbers in sequence";
cin >> n;
cout << "Enter number";
cin >> p;
for(int a = 2; a <= n; a++) {
cout << "Enter " << a << " number";
cin >> x;
if (n > 1 && x > p) {
kol++;
p = x;
}
}
cout << "kol = " << kol;
}