Những câu hỏi liên quan
Zjn nè
Xem chi tiết
Du Nguyễn
Xem chi tiết
Nguyễn Lê Phước Thịnh
31 tháng 3 2022 lúc 23:34

uses crt;

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

t,tb,ln,nn:real;

i,n:integer;

begin

clrscr;

readln(n);

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

t:=0;

for i:=1 to n do t:=t+a[i];

writeln(t:4:2);

writeln(t/n:4:2);

nn:=a[1];

ln:=a[1];

for i:=1 to n do 

begin

 if nn>a[i] then nn:=a[i];

if ln<a[i] then ln:=a[i];

end;

writeln(nn);

writeln(ln);

readln;

end.

Bình luận (0)
Mai Đình Phú
Xem chi tiết
idol 5c
4 tháng 5 2023 lúc 20:17

0,33

 

Bình luận (0)
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)
Nguyễn Đức Hoàn
Xem chi tiết
Nguyễn Văn Tùng
5 tháng 5 2023 lúc 20:45

Đây là code Pascal để nhập và in điểm kiểm tra học kì môn tin cho N của từng học sinh:

program DiemKT;

var
N, i: integer;
diem: array1..100 of integer;

begin
write('Nhap so hoc sinh: ');
readln(N);

for i := 1 to N do
begin
write('Nhap diem kiem tra hoc ki cua hoc sinh thu ', i, ': ');
readln(diemi);
end;

writeln('Diem kiem tra hoc ki cua ', N, ' hoc sinh la:');

for i := 1 to N do
writeln('Hoc sinh thu ', i, ': ', diemi);

end.

Bình luận (0)
Trần Khải
Xem chi tiết
Nguyễn Lê Phước Thịnh
5 tháng 4 2021 lúc 13:12

uses crt;

var ten:array[1..50]of string;

diem:array[1..50]of integer;

i,n,max:integer;

begin

clrscr;

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

for i:=1 to n do 

  begin

       write('Ten cua hoc sinh thu ',i,' la: '); readln(ten[i]);

write('Diem cua hoc sinh thu ',i,' la: '); readln(diem[i]);

end;

max:=0;

for i:=1 to n do 

  if max<diem[i] then max:=diem[i];

writeln('Diem cao nhat la: ',max);

for i:=1 to n do 

  if diem[i]=max then writeln(ten[i]);

readln;

end.

Bình luận (0)
Nguyễn Quỳnh Anh 8A
Xem chi tiết
Nguyễn Lê Phước Thịnh
2 tháng 4 2022 lúc 6:59

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]);

ln:=0;

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

writeln(ln:4:2);

readln;

end.

Bình luận (1)
eeedddd
Xem chi tiết
01.Xuân Anh Dư
Xem chi tiết
Nguyễn Lê Phước Thịnh
30 tháng 12 2021 lúc 15:10

#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;

}

Bình luận (0)