!!"#!$$% &'()*+,- +.&'/0,10,2+. +34567&8'+#'$9 :; <;= <>? @ABCDB; !"#$%&'()%*(+ !"#$%&'(!"#$&%*')%*,(+ &+ -./ int USCLN(p, q) { if (p%q= =0) return q; else return(USCLN(q, p%q)); } &+ 0 1$2' 3 456(7&28 49:2; + F X (7&2&8 49:29; + F X (7&2&&98 49:9<; + F X (7&2&&9&<8 49:<; + F X (7&2&&9&<&&8 &+ -1$2' 3 456(72&8 49:; + F X (7&2&8 49:2; + F X (7&2&&8 49:29; + F X (7&2&&9&8 49:9<; + F X (7&2&&9&<&8 49:<; + F X (7&2&&9&<&&8 &+ =>?@ E #include"conio.h" #include"iostream.h" #include"string.h" #include"stdio.h" class diem { private: char *mahs; char *hoten; float t,l,h; public: diem() { mahs=new char[10];hoten=new char[40]; t=0;l=0;h=0; } ~diem() { delete mahs; delete hoten; } void nhap() { cout<<"\nMa hoc sinh:";gets(mahs); cout<<"\nHo va ten:"; gets(hoten); fflush(stdin); cout<<"diem toan:";cin>>t; cout<<"diem ly:";cin>>l; cout<<"diem hoa:";cin>>h; } void hienthi() { cout<<"\n"<<mahs<<" "<<hoten<<" "<<t<<" "<<l<<" "<<h<<" "<<t+l+h; } int xet_ll() { if(t+l+h>=15 &&t>0 &&l>0&&h>0) return 1; else return 0; } }; +&0 +& +&0 +& +&0 =>0?@ class BD { private: diem ds[50]; int n; public: void nhapBD(); void hienthiBD(); void DSDo(); }; void BD::nhapBD() { cout<<"\nNhap so hoc sinh (<50)";cin>>n; for(int i=0;i<n;i++) { cout<<"\nNhap thong tin cua hoc sinh thu "<<i<<":\n"; ds[i].nhap(); } } void BD::hienthiBD() { cout<<"\nMahs Ho va ten Toan Ly Hoa Tongdiem"; for(int i=0;i<n;i++) ds[i].hienthi(); } void BD::DSDo() { cout<<"\nDanh sach thi sinh do"; cout<<"\nMahs Ho va ten Toan Ly Hoa Tongdiem"; for(int i=0;i<n;i++) if(ds[i].xet_ll()) ds[i].hienthi(); } +&0A +&0A +&0A +&0A void main() { BD ds; ds.nhapBD(); ds.hienthiBD(); ds.DSDo(); getch(); } +&0 @ADF =>B?@ =>@?@ . ds[i].nhap(); } } void BD::hienthiBD() { cout<<" Mahs Ho va ten Toan Ly Hoa Tongdiem"; for(int i=0;i<n;i++) ds[i].hienthi(); } void BD::DSDo() . cout<<" Danh sach thi sinh do"; cout<<" Mahs Ho va ten Toan Ly Hoa Tongdiem"; for(int i=0;i<n;i++) if(ds[i].xet_ll()) ds[i].hienthi();