K
Khách

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.

2 tháng 5 2023

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.

9 tháng 5 2022

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 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.

 

 

 

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.

 

19 tháng 5 2023

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.

28 tháng 4 2022

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!

28 tháng 4 2022

i:byte nghĩa là sao bạn

 

9 tháng 5 2021

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

9 tháng 5 2021

Ngôn ngữ tin học 8

9 tháng 4 2021

9 tháng 4 2021

undefined

Nếu chưa học câu lệnh này thì rep lại cho mình để mình dùng mấy câu lệnh đã học từ b8 trở về trước nhá! Good luck for you :D