C++ Исправьте пожалуйста
#include
#include
using namespace std;
int main()
{
int a,b,c,d,x1,x2;
ifstream input;
ofstream output;
input.open("input.txt");
input >> a;//кол-во мешков
input >> b>>c>>d; //кол-во монет в мешке
output.open("output.txt");
If (b>c)
If (c>d) {output << c;}
else {output << d;}
else {If (b>d) {output << b;}}
If (c>b)
if (b>d) {output << b;}
else {output << d;}
Else {if (c>d) {output << c;}}
if (c>d)
if (d>b) {output << d;}
else {output << b;}
Else {If (c>b) {output << c}}
input.close();
output.close();
return 0;
}