Bài 7. Câu lênh lặp

CuaCua

viết chương trình nhập vào các điểm thi windows, winword,winword,execl.Tính điểm trung bình(lấy giá trị có 1 số lẻ thập phân)

Phía sau một cô gái
7 tháng 9 2023 lúc 22:26

program TinhDiemTrungBinh;

uses crt;

var

     diemWindows, diemWinword, diemExcel, diemTrungBinh: real;

begin

     clrscr;

     writeln('Nhập điểm thi Windows:');

     readln(diemWindows);

     writeln('Nhập điểm thi Winword:');

     readln(diemWinword);

     writeln('Nhập điểm thi Excel:');

     readln(diemExcel);

     diemTrungBinh := (diemWindows + diemWinword + diemExcel) / 3;

     writeln('Điểm trung bình: ', diemTrungBinh:0:1);

     readln;

end.

Bình luận (0)
Phạm Dương Phúc Khang
21 tháng 1 lúc 22:58

var

     Windows, Winword, Excel, TB: real;

begin

     clrscr;

     writeln('Nhập điểm thi Windows:');

     readln(Windows);

     writeln('Nhập điểm thi Winword:');

     readln(Winword);

     writeln('Nhập điểm thi Excel:');

     readln(Excel);

    TB := (Windows + Winword + Excel) / 3;

     writeln('Điểm trung bình: ', TB:0:1);

     readln;

end.

Bình luận (0)

Các câu hỏi tương tự
Phan Thị Ka
Xem chi tiết
Maiiii
Xem chi tiết
Bảo Trâm
Xem chi tiết
Lê Đăng Khôi
Xem chi tiết
Lâm Khả Doanh
Xem chi tiết
huy hoàng
Xem chi tiết
Minh Đông
Xem chi tiết
Mai thị tố uyên
Xem chi tiết
Lê Bích Thủy
Xem chi tiết