Những câu hỏi liên quan
Nguyễn Kim Trí
Xem chi tiết
Nguyễn Lê Phước Thịnh
13 tháng 2 2022 lúc 20:49

#include <bits/stdc++.h>

using namespace std;

double a[100],b[100],c[100],tb[100];

int n,i;

int main()

{

cin>>n;

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

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

tb[i]=(a[i]+b[i]+c[i])/3;

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

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

return 0;

 

}

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

Bình luận (0)
Nguyên Đăng
Xem chi tiết
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.

Bình luận (0)
Đỗ Thị Minh Ngọc
Xem chi tiết
⭐Hannie⭐
3 tháng 5 2022 lúc 21:56

Tham khảo

Var a,b:array[1..100] of integer;
          c: array[1..100] of real;
          i,n:integer;
Begin
write('Nhap so hoc sinh: ');readln(n);
writeln('Nhap diem Toan');
for i:=1 to n do begin write(i,'. ');readln(a[i]);end;
writeln('Nhap diem Van');
for i:=1 to n do begin write(i,'. ');readln(b[i]);end;
for i:=1 to n do c[i]:=(a[i]+b[i])/2;
writeln('Diem trung binh');
for i:=1 to n do writeln(i,'. ',c[i]);
readln

Bình luận (1)
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)
thiện nhân
Xem chi tiết
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)
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.

Bình luận (0)