#include
usingnamespacestd;
structstudent{
intno;
stringname;
ints_m;
ints_cn;
ints_en;
intsum;
floatavg;
}stu[5];
intmain()
{
inti;
cout
ofstreamout("f3.txt");
if(!out){cout
for(i=0;i
cin>>stu[i].no>>stu[i].name>>
stu[i].s_m>>stu[i].s_cn>>stu[i].s_en;
out
stu[i].s_m
}
out.close();
ifstreamin("f3.txt");
if(!in){cout
in>>stu[i].no>>stu[i].name>>
stu[i].sum=stu[i].s_m+stu[i].s_cn+stu[i].s_en;
stu[i].avg=stu[i].sum/3;
in.close();
#include
#include
#include
usingnamespacestd;
structstudent{
intno;
stringname;
ints_m;
ints_cn;
ints_en;
intsum;
floatavg;
}stu[5];
intmain()
{
inti;
cout
ofstreamout("f3.txt");
if(!out){cout
cout
for(i=0;i
{
cin>>stu[i].no>>stu[i].name>>
stu[i].s_m>>stu[i].s_cn>>stu[i].s_en;
out
stu[i].s_m
}
cout
out.close();
cout
ifstreamin("f3.txt");
if(!in){cout
cout
for(i=0;i
{
in>>stu[i].no>>stu[i].name>>
stu[i].s_m>>stu[i].s_cn>>stu[i].s_en;
if(!in){cout
stu[i].sum=stu[i].s_m+stu[i].s_cn+stu[i].s_en;
stu[i].avg=stu[i].sum/3;
cout
stu[i].s_m
}
in.close();
}