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.
Tk
Program Can_nang;
Uses Crt;
Var W,h,BMI: Real;
Begin
Clrscr;
Writeln('Nhap can nang');Readln(W);
Writeln('Nhap chieu cao');Readln(h);
BMI:= W/h*h ;
Writeln(' Chi so khoi cua co the la', BMI:0:1);
If (BMI >=25) then Write(' Ban map roi do nhe');
If (18.5<=BMI) and (BMI<25) then Write(' Ban phat trien binh thuong') ;
If (BMI< 25) then Write(' Ban phat trien cham roi') ;
Readln;
end.
Var a:array:[1..1000] of real;
i,n:integer;
max,min,s,tb:real;
Begin
Write('Nhap so luong hoc sinh: ');readln(n);
For i:=1 to n do
Begin
Write('Nhap chieu cao hs thu ',i,' = ');readln(a[i]);
s:=s+a[i];
End;
tb:=s/n;
max:=a[1];min:=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;
writeln('Chieu cao lon nhat la ',max:10:1);
Writeln('Chieu cao nho nhat la ',min:10:1);
Write('Chieu cao trung binh la ',tb:10:1);
Readln
End.
Var a:array:[1..50] of real;
i,max:integer;
Begin
For i:=1 to 50 do
Begin
Write('Nhap so thu ',i,' = ');readln(a[i]);
End;
Write('Cac diem vua nhap la: ');
For i:=1 to 50 do
Write(a[i]:10:2);
Writeln;
max:=a[1];
For i:=2 to 50 do
if a[i]>max then max:=a[i];
Write('Diem trung binh lon nhat la ',max:10:2);
Readln
End.
Var a:array:[1..50] of real;
i:integer;
max:real;
Begin
For i:=1 to 50 do
Begin
Write('Nhap diem thu ',i,' = ');readln(a[i]);
End;
Write('Cac diem vua nhap la: ');
For i:=1 to 50 do
Write(a[i]:10:2);
writeln;
max:=a[1];
For i:=2 to 50 do
if a[i] > max then max:=a[i];
write('Diem lon nhat la ',max:10: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
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.