读取三门课程的成绩,将其求平均值后输出
入门水平,细心就好
#include<iostream>
using namespace std;
int main()
{
float a1, a2, a3;
cout << "please enter the first score:";
cin >> a1;
cout << "please enter the second score:";
cin >> a2;
cout << "please enter the third score:";
cin >> a3;
cout << "the score is: " << (a1 + a2 + a3) / 3;
return 0;
}