YOMEDIA
NONE

Một học sinh nhập từ bàn phím điểm toán , lý , hoá , anh , văn , sinh , sử , địa , gdcd, gd quốc phòng , công nghệ , thể dục . Các con điểm là các số thực từ 0 đến 10 . Nếu Vi phạm phải nhập lại . In điểm ra màn hình và tính điểm xếp loại như sau

1. Điểm trung bình = tổng điểm các môn chia cho 13 , làm tròn đến chữ số thập phân thứ 2

2 . Xếp loại :

Giỏi nếu điểm tb >=8

Khá nếu điểm tb >= 6,5

Tb nếu 5<điểm tb <6,5 , trường hợp còn lại yếu kém

Theo dõi Vi phạm
ADSENSE

Trả lời (1)

  • uses crt;

    var toan,ly,hoa,anh,van,sinh,su,dia,gdcd,gdqp,cn,td,dtb:real;

    begin

    clrscr;

    repeat

    write('nhap diem toan hoc:'); readln(toan);

    if (toan<0) or (toan>10) then writeln('nhap lai');

    until (0<=toan) and (toan<=10);

    repeat

    write('nhap diem vat ly:'); readln(ly);

    if (ly<0) or (ly>10) then writeln('nhap lai');

    until (0<=ly) and (ly<=10);

    repeat

    write('nhap diem hoa hoc:'); readln(hoa);

    if (hoa<0) or (hoa>10) then writeln('nhap lai');

    until (0<=hoa) and (hoa<=10);

    repeat

    write('nhap diem tieng anh:'); readln(anh);

    if (anh<0) or (anh>10) then writeln('nhap lai');

    until (0<=anh) and (anh<=10);

    repeat

    write('nhap diem ngu van:'); readln(van);

    if (van<0) or (van>10) then writeln('nhap lai');

    until (0<=van) and (van<=10);

    repeat

    write('nhap diem sinh hoc:'); readln(sinh);

    if (sinh<0) or (sinh>10) then writeln('nhap lai');

    until (0<=sinh) and (sinh<=10);

    repeat

    write('nhap diem lich su:'); readln(su);

    if (su<0) or (su>10) then writeln('nhap lai');

    until (0<=su) and (su<=10);

    repeat

    write('nhap diem dia li:'); readln(dia);

    if (dia<0) or (dia>10) then writeln('nhap lai');

    until (0<=dia) and (dia<=10);

    repeat

    write('nhap diem giao duc cong dan:'); readln(gdcd);

    if (gdcd<0) or (gdcd>10) then writeln('nhap lai');

    until (0<=gdcd) and (gdcd<=10);

    repeat

    write('nhap diem giao duc quoc phong:'); readln(gdqp);

    if (gdqp<0) or (gdqp>10) then writeln('nhap lai');

    until (0<=gdqp) and (gdqp<=10);

    repeat

    write('nhap diem cong nghe:'); readln(cn);

    if (cn<0) or (cn>10) then writeln('nhap lai');

    until (0<=cn) and (cn<=10);

    repeat

    write('nhap diem the duc:'); readln(td);

    if (td<0) or (td>10) then writeln('nhap lai');

    until (0<=td) and (td<=10);

    dtb:=(toan+ly+hoa+anh+van+sinh+su+dia+gdcd+gdqp+cn+td)/13;

    writeln('diem trung binh la: ',dtb:4:2);

    if dtb>=8 then writeln('gioi')

    else if (dtb<8) and (dtb>=6.5) then writeln('kha')

    else if (dtb>6.5) and (dtb<=5) then writeln('trung binh')

    else writeln('yeu');

    readln;

    end.

      bởi Tieu Giao 17/11/2021
    Like (0) Báo cáo sai phạm

Nếu bạn hỏi, bạn chỉ thu về một câu trả lời.
Nhưng khi bạn suy nghĩ trả lời, bạn sẽ thu về gấp bội!

Lưu ý: Các trường hợp cố tình spam câu trả lời hoặc bị báo xấu trên 5 lần sẽ bị khóa tài khoản

Gửi câu trả lời Hủy
 
NONE

Các câu hỏi mới

AANETWORK
 

 

YOMEDIA
AANETWORK
OFF