23 lines
460 B
C++
23 lines
460 B
C++
#include <iostream>
|
|
#include <fstream>
|
|
using namespace std;
|
|
|
|
int main(void)
|
|
{
|
|
int lastValue = 0;
|
|
int currentValue = 0;
|
|
int decreaseCount = 0;
|
|
cout << "test\n";
|
|
ifstream readFile ("data/input.txt", ios::in);
|
|
|
|
while(readFile >> currentValue)
|
|
{
|
|
if (lastValue != 0)
|
|
{
|
|
if (lastValue < currentValue) decreaseCount++;
|
|
}
|
|
lastValue = currentValue;
|
|
}
|
|
cout << decreaseCount;
|
|
return 0;
|
|
}
|