#include
#include
using namespace std;
int main()
{
ofstream outfile("1.txt",ios::out);
if(!outfile)
{
cerr<<"open error!"<
}
double i=1,Na,Nb;
double Asum=0;
double Bsum=0;
while(i<6)
{
cout<<"第"<cin>>Na>>Nb;
while(Na<10||Na>99||Nb<10||Nb>99)
{
cout<<"输入错误,请重新输入A和B的值!(A,B是两位整数)"<
}
Asum=Asum+Na;
Bsum=Bsum+Nb;
i++;
}
double sum1=Asum/5;
cout<<"A的平均值为:"<
cout<<"B的平均值为:"<
return 0;
}
应该很容易吧!