#include<iostream>
#include<iomanip>
using namespace std;
const int n=2;
struct student
{
char num[6];
int score;
struct student*next;
}stu[n];
void main()
{
void putin();
void print();
putin();
print();
}
void putin()
{
for(int i=0;i<n;i++)
{
cout<<"输入编号:"<<endl;
cout<<"NO.";
cin>>stu[i].num;
cout<<"score";
cin>>stu[i].score;
}
cout<<endl;
}
void print()
{
int i;
cout<<"NO score"<<endl;
for(i=0;i<n;i++)
{cout<<stu[i].num<<" "<<stu[i].score<<endl;}
cout<<endl;
}
![](https://img-my.csdn.net/uploads/201303/12/1363100512_1623.png)