Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
program SoSanhDiem;
var
DiemManh, DiemThanh: real;
begin
write('Nhap diem cua ban Manh: ');
readln(DiemManh);
write('Nhap diem cua ban Thanh: ');
readln(DiemThanh);
if DiemManh > DiemThanh then
writeln('Ban Manh dat diem cao hon ban Thanh.')
else if DiemManh < DiemThanh then
writeln('Ban Thanh dat diem cao hon ban Manh.')
else
writeln('Hai ban dat diem bang nhau.');
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a,b,c,tb;
int main()
{
cin>>a>>b>>c;
tb=(a+b)*2+c;
if (tb>=38) cout<<"Chuc man ban da thi dau tuyen sinh";
else cout<<"Ban da thi rot, chuc may man lan sau";
return 0;
}
program DiemTB;
var
diemToan, diemVan, diemTB: real;
begin
write('Nhap diem mon Toan: ');
readln(diemToan);
write('Nhap diem mon Van: ');
readln(diemVan);
diemTB := (diemToan + diemVan) / 2;
writeln('Diem trung binh: ', diemTB:0:2);
if diemTB >= 5 then
writeln('Chuc mung! Ban da dau ky thi.')
else
writeln('Rat tiec! Ban da truot ky thi.');
readln;
end.
refer
uses crt;
var i,n:longint;
a:array[1..100] of real;
s1,s,max,min:real;
begin
clrscr;
write('Nhap n: '); readln(n);
for i:=1 to n do
begin
write('Diem trung binh mon tin hoc cua ban thu ',i,' la: ');readln(a[i]);
end;
min:=a[1];max:=a[1];
for i:=2 to n do begin
if a[i]>max then max:=a[i];
if a[i]<min then min:=a[i]; end;
for i:=1 to n do
s:=s+a[i];
s1:=s/n;
writeln('So diem cao nhat la: ',max);
writeln('So diem thap nhat la: ',min);
write('Diem TB cua ca lop la: ',s1:0:1);
readln
program TimDiemCaoNhat;
var
diem: array[1..30] of integer;
i, diemCaoNhat, soThuTu: integer;
begin
for i := 1 to 30 do
begin
write('Nhap diem cua ban thu ', i, ': ');
readln(diem[i]);
end;
diemCaoNhat := diem[1];
soThuTu := 1;
for i := 2 to 30 do
begin
if diem[i] > diemCaoNhat then
begin
diemCaoNhat := diem[i];
soThuTu := i;
end;
end;
writeln('Diem cao nhat la: ', diemCaoNhat);
writeln('Ban thu ', soThuTu, ' dat diem cao nhat.');
readln;
end.
Program HOC24;
var a,b: real;
begin
write('Nhap diem cua Manh: '); readln(a);
write('Nhap diem cua Thanh: '); readln(b);
if a>b then write('Diem cua ban Manh cao hon ban Thanh');
if a<b then write('Diem cua ban Thanh cao hon ban Manh');
if a=b then write('Diem cua ban Manh bang ban Thanh');
readln
end.