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.

thiện nhân
Xem chi tiết
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.

Nguyễn Tuấn Anh
Xem chi tiết
Phía sau một cô gái
10 tháng 4 2023 lúc 20:20

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.

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 Vân
Xem chi tiết
Kiều Vũ Linh
5 tháng 5 2023 lúc 7:50

var i,n,s:integer;

t,v,a,tb:real;

begin

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

for i:=1 to n do

begin

write('Nhap diem toan ');readln(t);

write('Nhap diem van ');readln(v);

write('Nhap diem anh ');readln(a);

s:=t+v+a;

tb:=s/3;

write('DTB cua ban thu ',i,' = ',tb:10:2);

s:=0;

end;

readln

end.

Nguyễn Huỳnh Mai Trân
Xem chi tiết
Nguyễn Lê Phước Thịnh
14 tháng 4 2022 lúc 22:04

uses crt;

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

n,i,dem:integer;

begin

clrscr;

readln(n);

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

dem:=0;

for i:=1 to n do 

  if a[i]>=8 then dem:=dem+1;

for i:=1 to n do 

 if a[i]>=8 then write(a[i]:4:2,' ');

writeln;

writeln(dem);

readln;

end.