#include<iostream> using namespace std; struct sinhvien { char hoten[50]; int tuoi; char quequan[100]; }; //Nhap sinh vien void nhap(sinhvien &x) { cout<<"Hoten : ";cin.ignore(); cin.getline(x.hoten,50); cout<<"Tuoi : "; cin>>x.tuoi; cout<<"QueQuan : ";cin.ignore(); cin.getline(x.quequan,50); } //Xuat sinh vien void in(sinhvien &x) { cout<<" "<<x.hoten<<" "<<x.tuoi<<" "<<x.quequan<<endl; } void main() { int i,n; sinhvien a[100]; cout<<"NHAP SO LUONG SINH VIEN:";cin>>n; cout<<endl<<endl; for(i=0;i<n;i++) { cout<<"\nThong tin sv["<<i<<"]\n"; nhap(a); } cout<<"\n\t\tDANH SACH SINH VIEN\n\n"; for(i=0;i<n;i++) { in(a); } }