@fama
0 / 0 / 0
Регистрация: 14.04.2014
Сообщений: 16
|
30.04.2014, 14:24
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| #include <fstream>
#include <iostream>
using namespace std;
int count(double *array, int size) {
int cnt = 0;
for (int i = 1; i < size; i++)
if (array[i] > array[i - 1])
cnt++;
return cnt;
}
int main()
{
double a[200];
ifstream F("L7.txt");
int i = 0;
while(!F.eof())
{
F>>a[i];
i++;
}
int kolichestvo = count(a,i);
cout << kolichestvo<< endl;
return 0;
} |
|
0
|