Files
2024-03-17 22:30:49 +08:00

28 lines
321 B
C++

#include <bits/stdc++.h>
using namespace std;
int main() {
ifstream in("input.txt");
if (!in) {
cout << "Error opening file";
exit(1);
}
ofstream out("output.txt");
double max;
in >> max;
double i;
while (in >> i)
if (i > max)
max = i;
out << max << endl;
in.close();
out.close();
return 0;
}