foo.cpp:1:1: error: 'include' does not name a type
include<cstdio> include<iostream> include<cstring> include<algorithm> define max 100000
^
foo.cpp:3:9: error: 'max' was not declared in this scope
int tot[max];
^
foo.cpp:7:1: error: 'string' does not name a type
string name;
^
foo.cpp:10:6: error: 'max' was not declared in this scope
}stu[max];
^
foo.cpp: In function 'int main()':
foo.cpp:14:1: error: 'cin' was not declared in this scope
cin>>n;
^
foo.cpp:17:6: error: 'stu' was not declared in this scope
cin>>stu[i].name>>stu[i].gra1>>stu[i].gra2>>stu[i].a>>stu[i].b>>stu[i].pas;
^
foo.cpp:18:32: error: 'tot' was not declared in this scope
if(stu[i].gra1>80&&stu[i].pas) tot[i]+=8000;
^
foo.cpp:19:36: error: 'tot' was not declared in this scope
if(stu[i].gra1>85&&stu[i].gra2>80) tot[i]+=4000;
^
foo.cpp:20:20: error: 'tot' was not declared in this scope
if(stu[i].gra1>90) tot[i]+=2000;
^
foo.cpp:21:35: error: 'tot' was not declared in this scope
if(stu[i].gra1>85&&stu[i].b=='Y') tot[i]+=1000;
^
foo.cpp:22:35: error: 'tot' was not declared in this scope
if(stu[i].gra2>80&&stu[i].a=='Y') tot[i]+=850;
^
foo.cpp:26:4: error: 'tot' was not declared in this scope
if(tot[i]>maxn) {maxn=tot[i]; re=i;}
^
foo.cpp:27:6: error: 'tot' was not declared in this scope
sum+=tot[i];
^
foo.cpp:29:1: error: 'cout' was not declared in this scope
cout<<stu[re].name<<'\n'<<maxn<<'\n'<<sum;
^
foo.cpp:29:7: error: 'stu' was not declared in this scope
cout<<stu[re].name<<'\n'<<maxn<<'\n'<<sum;
^