char name[7];
char id;
float score;
int rate;
struct student {
char name[7];
char id;
float score;
int rate;
};
struct student {
char name[7];
char id;
float score;
int rate;
}student1, student2;
#include <iostream>
using namespace std;
struct student {
char name[20];
char id[7];
float score;
int rate;
}student1;
int main() {
cin >> student1.name;
cin >> student1.id;
cin >> student1.score;
cin >> student1.rate;
cout << student1.name << endl;
cout << student1.id << endl;
cout << student1.score << endl;
cout << student1.rate << endl;
}
#include <iostream>
using namespace std;
struct student {
char name[20];
char id[7];
float score;
int rate;
}student2[2];
int main() {
for (int i = 0; i < 2; i++) {
cin >> student2[i].name;
cin >> student2[i].id;
cin >> student2[i].score;
cin >> student2[i].rate;
}
cout << student2[1].name << endl;
cout << student2[1].id << endl;
cout << student2[1].score << endl;
cout << student2[1].rate << endl;
}