uses crt;
var diem: array[1..11] of real; temp: string; td, an, mt: boolean; i,xhdnv,xhdt,xhdta,xhd,xhhk,kq:byte; tod,tb: real;
begin
clrscr;
write('Nhap diem so mon Toan: ');
readln(diem[1]);
write('Nhap diem so mon Ngu Van: ');
readln(diem[2]);
write('Nhap diem so mon Anh Van: ');
readln(diem[3]);
write('Nhap diem so mon Hoa Hoc: ');
readln(diem[4]);
write('Nhap diem so mon Vat Ly: ');
readln(diem[5]);
write('Nhap diem so mon Sinh Hoc: ');
readln(diem[6]);
write('Nhap diem so mon Dia Ly: ');
readln(diem[7]);
write('Nhap diem so mon Lich Su: ');
readln(diem[8]);
write('Nhap diem so mon Cong Nghe: ');
readln(diem[9]);
write('Nhap diem so mon GDCD: ');
readln(diem[10]);
write('Nhap diem so mon Tin Hoc: ');
readln(diem[11]);
writeln('=========================================');
writeln('Quy dinh: D la dat, CD la chua dat.');
write('Nhap loai diem mon The Duc: ');
readln(temp);
if (upcase(temp)='D') then td:=true else td:=false;
temp:='';
write('Nhap loai diem mon Am nhac: ');
readln(temp);
if (upcase(temp)='D') then an:=true else an:=false;
write('Nhap loai diem mon Mi Thuat: ');
readln(temp);
if (upcase(temp)='D') then mt:=true else mt:=false;
writeln('=========================================');
write('Nhap hanh kiem: (1: Tot, 2: Kha, 3: Trung Binh, 4: Kem): ');
readln(xhhk);
{Tinh diem trung binh va xep loai}
for i:=1 to 11 do
begin
tod:=tod+diem[i];
end;
tb:=tod/11;
if (tb >=8) then xhd:=1 else
if (tb>=6.5) then xhd:=2 else
if (tb>=5) then xhd:=3 else xhd:=4;
{Tinh toan xem ngu van, tieng anh, tin hoc coi thu xem cao nhat duoc bao nhieu}
if (diem[2]>=6.5) then xhdnv:=1 else
if (diem[2]>=5) then xhdnv:=2 else
if (diem[2]>=3.5) then xhdnv:=3 else
xhdnv:=4;
if (diem[1]>=6.5) then xhdt:=1 else
if (diem[1]>=5) then xhdt:=2 else
if (diem[1]>=3.5) then xhdt:=3 else
xhdt:=4;
if (diem[3]>=6.5) then xhdta:=1 else
if (diem[3]>=5) then xhdta:=2 else
if (diem[3]>=3.5) then xhdta:=3 else
xhdta:=4;
{moi mon phu sai ha 1 bac}
if (td=false) then inc(xhhk);
if (mt=false) then inc(xhhk);
if (an=false) then inc(xhhk);
{Bat dau tinh toan cho ra ket qua: }
if (xhhk>=xhd) then kq:=xhhk else kq:=xhd;
if (xhdnv>=kq) then kq:=xhdnv;
if (xhdt>=kq) then kq:=xhdt;
if (xhdta>=kq) then kq:=xhdta;
if (kq=1) then writeln('Day la hoc sinh gioi. ') else
if (kq=2) then writeln('Day la hoc sinh kha') else
if (kq=3) then writeln('Day la hoc sinh trung binh.') else
writeln('Day la hoc sinh kem. ');
readln;
end.
Hình 2 test với trường hợp rơi về HSG khá = 6.5. Bạn xem lại thử nhé.
Tin học, tiếng Anh: informatics, tiếng Pháp: informatique, là một ngành khoa học chuyên nghiên cứu quá trình tự động hóa việc tổ chức, lưu trữ, xử lý và truyền dẫn thông tin của một hệ thống máy tính cụ thể hoặc trừu tượng (ảo). Với cách hiểu hiện nay, tin học bao hàm tất cả các nghiên cứu và kỹ thuật có liên quan đến việc mô phỏng, biến đổi và tái tạo thông tin.
Nguồn : Wikipedia - Bách khoa toàn thưLớp 8 - Năm thứ ba ở cấp trung học cơ sở, học tập bắt đầu nặng dần, sang năm lại là năm cuối cấp áp lực lớn dần nhưng các em vẫn phải chú ý sức khỏe nhé!
Nguồn : ADMIN :))Xem thêm tại https://loigiaisgk.com/cau-hoi or https://giaibtsgk.com/cau-hoi
Copyright © 2021 HOCTAPSGK