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.
uses crt;
var diem:real;
begin
clrscr;
repeat
write('Nhap diem trung binh:'); readln(diem);
until (0<=diem) and (diem<=10);
if diem<5 then writeln('Xep loai yeu')
else if (5<=diem) and (diem<6.5) then writeln('Xep loai trung binh')
else if (6.5<=diem) and (diem<8.0) then writeln('Xep loai kha')
else writeln('Xep loai gioi');
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a,b,c,tb;
int main()
{
cin>>a>>b>>c;
tb=(a+b+c)/3;
cout<<fixed<<setprecision(1)<<tb<<endl;
if (tb>=8) cout<<"Gioi";
else if ((6.5<=tb) and (tb<8)) cout<<"Kha";
else if ((5<=tb) and (tb<=6.5)) cout<<"Trung Binh";
else cout<<"Chua dat";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double a,b,c,tb;
int main()
{
cin>>a>>b>>c;
tb=(a+b+c)/3;
if (tb>=8) cout<<"Gioi";
else if ((6.5<=tb) and (tb<8)) cout<<"Kha";
else if ((5<=tb) and (tb<6.5)) cout<<"Trung Binh";
else cout<<"Chua Dat";
return 0;
}
program DiemTrungBinh;
var
i, n: integer;
diem, tong: real;
begin
n := 40;
tong := 0;
for i := 1 to n do
begin
write('Nhap diem cua hs ', i, ': ');
readln(diem);
tong := tong + diem;
end;
writeln('Diem cua lop la: ', tong / n:0:2);
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
Uses CRT;
Var TB : real;
BEGIN
clrscr;
repeat
begin
write('Moi ban nhap diem trung binh: ');
Readln(TB);
end;
until (TB>0) and (TB<10);
If (TB >= 8) then write('hoc luc gioi') else
If (TB>=6.5) then write('hoc luc kha') else
If (TB>5) then write('hoc luc trung binh') else
If (TB>3.5) then write('hoc luc yeu') else
write('hoc luc kem');
Readln;
END.
Uses CRT;
Var TB : real;
Begin
clrscr;
Readln(TB);
If TB >= 8 then write('hoc luc gioi') else
If 6.5<=TB<8 then write('hoc luc kha') else
If 5<=TB<6.5 then write('hoc luc trung binh') else
If 3.5<=TB<5 then write('hoc luc yeu') else
write('hoc luc kem');
Readln;
End.