Những câu hỏi liên quan
Thái Trực
Xem chi tiết
Bùi Anh Tuấn
25 tháng 4 2021 lúc 19:52

Bình luận (0)
Nguyễn Lê Phước Thịnh
25 tháng 4 2021 lúc 22:02

uses crt;

var a:array[1..10]of integer;

i,n,tb:integer;

begin

clrscr;

for i:=1 to 10 do 

  begin

write('A[',i,']='); readln(a[i]);

end;

for i:=1 to 10 do 

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

tb:=0;

for i:=1 to 10 do 

  tb:=tb+a[i];

writeln;

writeln('Diem trung binh cua 10 ban la: ',tb:4:2);

readln;

end.
 

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)
Gia Huy
Xem chi tiết
Huỳnh Kim Ngân
12 tháng 5 2022 lúc 18:50

Tham khảo

program oken;
uses crt;
var a: array [1..100] of real;
    i,n,dy,dtb,dk,dg:integer;
begin
        clrscr;
        write('Co bao nhieu ban can nhap diem: '); readln(N);
        for i:=1 to n do
                begin
                        write('nhap diem ban thu ',i,': ');
                        readln(a[i]);
                        if a[i]<5 then
                                dy:=dy+1
                        else if a[i]<6.4 then
                                dtb:=dtb+1
                        else if a[i]<7.9 then
                                dk:=dk+1
                        else
                                dg:=dg+1;
                end;
        writeln('So ban hoc yeu: ',dy);
        writeln('So ban hoc trung binh: ',dtb);
        writeln('So ban hoc kha: ',dk);
        writeln('so ban hoc gioi: ',dg);
        readln;
end.

Bình luận (0)
lê minh anh
12 tháng 5 2022 lúc 19:14

program Phanloai;

uses crt;

Var i, n, Gioi, Kha, Trungbinh, Kem: integer;

      A: array[1..100] of real;

Begin

clrscr;

write('Nhap so cac ban trong lop, n = '); readln(n);

writeln('Nhap diem:');

For i:=1 to n do Begin write(i,'.'); readln(a[i]); End;

Gioi:=0; Kha:=0; Trungbinh:=0; Kem:=0;

for i:=1 to n do

   begin

        if a[i]>=8.0 then Gioi:=Gioi+1;

        if a[i]<5 then Kem:=Kem+1;

        if (a[i]<8.0) and (a[i]>=6.5) then Kha:=Kha+1;

        if (a[i]>=5) and (a[i]<6.5) then Trungbinh:=trungbinh+1

     end;

writeln('Ket qua hoc tap:');

writeln(Gioi,' ban hoc gioi');

writeln(Kha,' ban hoc kha');

writeln(Trungbinh,' ban hoc trung binh');

writeln(Kem,' ban hoc kem');

readln

End.

Bình luận (0)
Anh Nguyễn
Xem chi tiết
Nguyến Ngọc Nguyên
Xem chi tiết
Minh Lệ
23 tháng 4 2021 lúc 12:53

Program HOC24;

var i,d: integer;

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

begin

for i:=1 to 6 do

begin

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

end;

write('Diem trung binh tren 6.5 la: '); 

for i:=1 to 6 do if a[i]>6.5 then write(a[i]:1:1,' ');

writeln;

d:=0;

for i:=1 to 6 do if a[i]<5 then d:=d+1;

write('Co ',d,' ban it hon 5 diem');

readln

end.

Bình luận (0)
Nguyễn Lê Phước Thịnh
23 tháng 4 2021 lúc 20:51

uses crt;

var a:array[1..6]of integer;

i,dem:integer;

begin

clrscr;

for i:=1 to 6 do 

  begin

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

end;

for i:=1 to 6 do 

  if a[i]>6.5 then write(a[i]:4);

writeln;

dem:=0;

for i:=1 to 6 do 

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

writeln(dem);

readln;

end.

Bình luận (0)
Nguyễn Minh Thiên
Xem chi tiết
Kiều Vũ Linh
2 tháng 5 2023 lúc 8:47

Var a:array[1..35] of real;

i:integer;

Begin

For i:=1 to 35 do

Begin

Write('Nhap diem thu ',i);readln(a[i]);

End;

write('Diem vua nhap la ');

For i:=1 to 35 do write(a[i]:10:2);

Writeln;

write('Cac diem duoi 5 hoac >  la ');

For i:=1 to 35 do

If (a[i]>9) or (a[i]<5) then write(a[i]:10:2)

Readln

End.

Bình luận (0)
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)
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.

Bình luận (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;

}

Bình luận (0)