Bạn chưa đăng nhập. Vui lòng đăng nhập để hỏi bài

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

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.

Trúc Quỳnh
Xem chi tiết
Trungnghia
9 tháng 4 2021 lúc 21:33

Trungnghia
9 tháng 4 2021 lúc 21:37

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 

Nguyễn Lê Phước Thịnh
9 tháng 4 2021 lúc 21:41

uses crt;

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

max:real;

i,n:integer;

begin

clrscr;

write('Nhap n='); readln(n);

for i:=1 to n do 

  begin

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

end;

max:=a[1];

for i:=1 to n do 

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

writeln(max);

readln;

end.

MON xuyênh gái
Xem chi tiết
nguyễn an phát
23 tháng 5 2021 lúc 14:29

uses crt;

var i,n:byte;Max:real;

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

begin

clrscr;

write('nhap so hoc sinh cua lop:');readln(n);

for i:=1 to n do

begin

  write('nhap diem trung binh mon tin cho hoc sinh thu ',i,':');readln(a[i]);

end;

max:=a[1];

for i:=1 to n do

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

writeln('diem trung binh mon tin cao nhat la: ',Max);

readln;

end.

nguyễn an phát
23 tháng 5 2021 lúc 14:45

uses crt;

var i,n:byte;Max:real;

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

begin

clrscr;

write('nhap so hoc sinh cua lop:');readln(n);

for i:=1 to n do

begin

  write('nhap diem trung binh mon tin cho hoc sinh thu ',i,':');readln(a[i]);

end;

max:=a[1];

for i:=1 to n do

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

writeln('diem trung binh mon tin cao nhat la: ',Max:0:1);

readln;

end.

thiện nhân
Xem chi tiết
eeedddd
Xem chi tiết
Giúp mik vs
Xem chi tiết
Nguyễn Lê Phước Thịnh
8 tháng 3 2022 lúc 6:58

#include <bits/stdc++.h>

using namespace std;

double a[100],t;

int n,i;

int main()

{

cin>>n;

for (i=1; i<=n; i++) cin>>a[i];

for (i=1; i<=n; i++)

cout<<"Diem cua ban thu "<<i<<" la: "<<fixed<<setprecision(2)<<a[i]<<endl;

t=0;

for (i=1; i<=n; i++) t+=a[i];

cout<<"Trung binh cua lop la: "<<fixed<<setprecision(2)<<t/(n*1.0);

return 0;

}

Hương Phạm
Xem chi tiết
Nguyễn Lê Phước Thịnh
19 tháng 12 2021 lúc 23:46

 

 

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

}

Hồ Thị Thủy Tiên
Xem chi tiết
Luân Đào
1 tháng 1 2021 lúc 16:13

var t,dt,a,tb: real;

begin

write('Nhap diem mon Toan: '); readln(t);

write('nhap diem mon Tin: '); readln(dt);

write('Nhap diem mon Anh: '); readln(a);

if (a<=0) or (a>=10) or (t<=0) or (t>=10) or (dt<=0) or (dt>=10) then

repeat

writeln('Khong hop le, nhap lai: ');

write('Nhap diem mon Toan: '); readln(t);

write('nhap diem mon Tin: '); readln(dt);

write('Nhap diem mon Anh: '); readln(a);

until (a>=0) and (a<=10) and (t>=0) and (t<=10) and (dt>=0) and (dt<=10);

tb:=(t+dt+a)/3;

writeln('Diem trung binh: ',tb:2:1);

if (dt>=6.5) and (t>=6.5) and (a>=6.5) and (tb>=8) then writeln('Gioi') else

if (dt>=5) and (t>=5) and (a>=5) and (tb>=6.5) then writeln('Kha') else writeln('Trung binh');

end.

Nguyễn Lê Phước Thịnh
2 tháng 1 2021 lúc 9:18

uses crt;

var toan,tin,anh,tb:real;

kt:integer;

begin

clrscr;

repeat

write('Nhap diem Toan:'); readln(toan);

write('Nhap diem Tin:'); readln(tin);

write('Nhap diem Anh:'); readln(anh);

until (0<=toan) and (toan<=10) and (0<=tin) and (tin<=10) and (0<=anh) and (anh<=10);

tb:=(toan+tin+anh)/3;

writeln('Diem trung binh cua 3 mon la: ',tb:4:2);

kt:=0;

if (tb>=8) and (toan>=6.5) and (tin>=6.5) and (anh>=6.5) then kt:=1;

if (6.5<=tb) and (tb<8) and (5<=toan) and (toan<6.5) and (5<=tin) and (tin<6.5) and (5<=anh) and (anh<6.5) then kt:=2;

if kt=0 then writeln('Hoc sinh trung binh');

if kt=1 then writeln('Hoc sinh gioi');

if kt=2 then writeln('Hoc sinh kha');

readln;

end.

Thanh Tâm
Xem chi tiết
Nguyễn Lê Phước Thịnh
7 tháng 5 2021 lúc 21:46

uses crt;

var a,b,c:real;

begin

clrscr;

write('Nhap diem Toan:'); readln(a);

write('Nhap diem Van:'); readln(b);

write('Nhap diem Anh:'); readln(c);

writeln('Diem trung binh la: ',(a+b+c)/3:4:2);

readln;

end.