#include<iostream>
#include<string>
using namespace std;
struct student{
char name[10];
int ID;
char hometown[2];
int department;
};
void main(){
struct student stu[10];
cout<<endl;
cout<<"☆★The information of students★☆"<<endl;
for(int i=0;i<10;i++)
{
cout<<endl;
cout<<"请输入第"<<i+1<<"位学生姓名:";
cin>>stu[i].name;
cout<<"~~~~~~~~~~~~~~~学号:";
cin>>stu[i].ID;
cout<<"~~~~~~~~~~~~~~~家乡:";
cin>>stu[i].hometown;
cout<<"~~~~~~~~~~~~~~~寝室:";
cin>>stu[i].department;
}
cout << " " << endl;
cout << "以下是学生的信息: " << endl;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载