Đầu tiên bạn nhập 3 môn toán, lí, hóa. Sau đó bạn dùng lệnh if - then - else
Bạn tham khảo:
Mã:
program tinhtong;
uses crt;
var t, l ,h: real;
begin
clrscr;
write('Nhap diem toan: '); readln(t);
write('Nhap diem li: '); readln(l);
write('Nhap diem hoa: '); readln(h);
If t+l+h >=18 then write('Ban da dau') else write('Ban da rot');
end.