Những câu hỏi liên quan
Khue Nguyen
Xem chi tiết
ERROR
9 tháng 5 2022 lúc 19:55

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

Bình luận (0)
Anh Hoàng
Xem chi tiết
Nguyễn Lê Phước Thịnh
30 tháng 4 2022 lúc 21:58

uses crt;

var a:array[1..100]of real;

i,n:integer;

ln:real;

begin

clrscr;

readln(n);

for i:=1 to n do readln(a[i]);

for i:=1 to n do writeln(a[i]);

ln:=a[1];

for i:=1 to n do if ln<a[i] then ln:=a[i];

writeln(ln);

readln;

end.

Bình luận (0)
Tiểu cường
Xem chi tiết
Nguyễn Lê Phước Thịnh
4 tháng 4 2022 lúc 7:14

 

 

 

uses crt;

var a,b,c,tb:array[1..10]of real;

ln,nn:real;

n:integer;

i:integer;

begin

clrscr;

readln(n);

for i:=1 to n do readln(a[i],b[i],c[i]);

for i:=1 to n do 

  tb[i]:=(a[i]+b[i]+c[i])/3;

for i:=1 to n do

writeln(tb[i]:4:2);

readln;

end.

 

Bình luận (0)
Nguyen Tan Dat
Xem chi tiết
Kiều Vũ Linh
19 tháng 5 2023 lúc 7:45

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.

Bình luận (0)
Trịnh Uyển Nhi
Xem chi tiết
Hoàng Long Đậu
Xem chi tiết
Thế Thôi
28 tháng 4 2022 lúc 21:01

uses crt;
var NS:array[1..100] of integer; Dtoan,Dvan,Dtb:array[1..100] of real;
hoten:array[1..100] of string; i:byte;
begin
clrscr;
for i:=1 to 45 do
begin
write('Nhap ten cua hoc sinh thu',i,':'); readln(hoten[i]);
write('Nhap ngay sinh:'); readln(NS[i]);
write('Nhap diem toan:'); readln(Dtoan[i]);
write ('Nhap diem van:'); readln(Dvan[i]);
Dtb[i]:=(Dtoan[i]+Dvan[i])/2;
end;
writeln('Diem trung binh cua cac ban trong lop la:');
for i:=1 to 45 do
writeln(hoten[i],':',Dtb[i]:1:2);
readln;
end.
Tham khảo thui!

Bình luận (5)
Hoàng Long Đậu
29 tháng 4 2022 lúc 0:11

jvgjvjvg

Bình luận (4)
Hoàng Long Đậu
29 tháng 4 2022 lúc 0:11

vjgjvjvjgjv

Bình luận (4)
Len nè cả nhà
Xem chi tiết
💢Sosuke💢
9 tháng 5 2021 lúc 19:43

Ngôn ngữ gì vậy bạn ?

Bình luận (2)
Nguyễn Lê Phước Thịnh
9 tháng 5 2021 lúc 20:15

uses crt;

var a:array[1..50]of real;

i,n:integer;

begin

clrscr;

write('Nhap so hoc sinh:'); readln(n);

for i:=1 to n do

  begin

write('Nhap diem cua ban thu ',i,':'); readln(a[i]);

end;

for i:=1 to n do 

  writeln('Diem cua ban thu ',i,' la: ',a[i]:4:2);

readln;

end.

Bình luận (1)
thiện nhân
Xem chi tiết
15 Nguyễn Hoàng gia huy
Xem chi tiết
Nguyễn Lê Phước Thịnh
28 tháng 2 2022 lúc 18:48

uses crt;

var a:array[1..100]of real;

i,n,dem1,dem2,dem3,dem4:integer;

begin

clrscr;

readln(n);

for i:=1 to n do readln(a[i]);

dem1:=0;

dem2:=0;

dem3:=0;

dem4:=0;

for i:=1 to n do 

  begin

 if (a[i]>=8) then inc(dem1);

if (6.5<=a[i]) and (a[i]<=7.9) then inc(dem2);

if (5<=a[i]) and (a[i]<=6.4) then inc(dem3);

if (a[i]<5) then inc(dem4);

end;

writeln('So hoc sinh gioi la: ',dem1);

writeln('So hoc sinh kha la: ',dem2);

writeln('So hoc sinh trung binh la: ',dem3);

writeln('So hoc sinh kem la: ',dem4);

readln;

end.

Bình luận (0)