# 期末考试排名
## 题目描述
期末考试结束了,班主任想对本班学生的成绩进行一个排名。大概的思路是确定要排名的人数,然后输入这些同学的姓名、语文、数学、外语成绩,最后输出学生姓名、总分及班级排名。
## 代码参考
#include
using namespace std;
struct st{
string name;
float chinese;
float math;
float english;
float sum;
int rank;
};
int main()
{
int n;
cout <<"请输入学生数:";
cin >> n;
st st1[n];
cout << "请按照以下提示输入:"<> st1[i].name >> st1[i].chinese>>st1[i].math>>st1[i].english;
st1[i].sum=st1[i].chinese+st1[i].math+st1[i].english;
}
for(int i=0;i