Code:
void main() { Student dssv[100]; float tong, diemtb; int soSV, i; tong = 0.0; cout << “\n Nhap vao so luong sinh vien: ”; cin >> soSV ; for (i=0; i< soSV ; i++) { [COLOR=#B22222]dssv[i].nhapthongtin();[/COLOR] tong = tong + dssv[i].xuatdiem(); } cout << “Ma so Diem”<< endl; for (i=0; i< soSV; i++) dssv[i].xuatthongtin(); diemtb = tong / soSV; cout << “Diem TB cac sinh vien = ” << diemtb; }// ket thuc ham main
Comment