Tin học 11

huutoan00

Học sinh tiến bộ
Thành viên
19 Tháng hai 2012
181
67
181
24
Your UnderWorld
www.facebook.com
Bạn check lại hộ mình xem đúng ko
Mã:
uses crt;
var    i,j:byte;
    a: array [1..4,0..11] of real;
begin
    for j:=1 to 4 do
    begin
        for i:=1 to 10 do
        begin
            write('Diem cua nguoi ',i,' to ',j,': );readln(a[j,i]);
            a[j,11]:=a[j,11]+a[j,i]/10;
        end;
        for i:=1 to 4 do if a[i,11]> a[j,11] then inc(a[j,0]);
    end;

    for j:=1 to 4 do
        writeln('Diem TB to ',j,' :',a[j,11]:0:2,', xep thu ',a[j,0]:0:0);
    readln;
end.
 
  • Like
Reactions: H.Đ.O.M.G

Nguyễn Thánh Tiền

Mr Favoirite 2012
Thành viên
2 Tháng mười 2010
1,931
782
324
Hà Nội
cO VUA
uses crt; var i,j:byte; a: array [1..4,0..11] of real; begin for j:=1 to 4 do begin for i:=1 to 10 do begin write('Diem cua nguoi ',i,' to ',j,': );readln(a[j,i]); a[j,11]:=a[j,11]+a[j,i]/10; end; for i:=1 to 4 do if a[i,11]> a[j,11] then inc(a[j,0]); end; for j:=1 to 4 do writeln('Diem TB to ',j,' :',a[j,11]:0:2,', xep thu ',a[j,0]:0:0); readln; end.

uses crt;
var i,j:byte;
a, b ,c , d ,k: real;
begin
for j:=1 to 40 do
begin
readln(k);
if j<11 then a:=a+k else if j<21 then b:=b+k else if j<31 then c:=c+k else d=d+k; end;

end;


readln;
end.
 

adolf99

Học sinh chăm học
Thành viên
1 Tháng ba 2017
57
12
86
24
Bạn check lại hộ mình xem đúng ko
Mã:
uses crt;
var    i,j:byte;
    a: array [1..4,0..11] of real;
begin
    for j:=1 to 4 do
    begin
        for i:=1 to 10 do
        begin
            write('Diem cua nguoi ',i,' to ',j,': );readln(a[j,i]);
            a[j,11]:=a[j,11]+a[j,i]/10;
        end;
        for i:=1 to 4 do if a[i,11]> a[j,11] then inc(a[j,0]);
    end;

    for j:=1 to 4 do
        writeln('Diem TB to ',j,' :',a[j,11]:0:2,', xep thu ',a[j,0]:0:0);
    readln;
end.
sao mình chạy k dc nhỉ ?
 

nguyenhoanghai9d@gmail.com

Học sinh
Thành viên
10 Tháng mười hai 2015
13
3
21
cái này cần gì mảng hai chiều cho phức tạp

program bai_tap;
uses crt;
var tong,tmp:real;
a:array[1..4]of real;
i:byte;
begin
tong:=0
for i:=1 to 40 do
begin
write('nhap diem nguoi thu ',i mod 10,' to ',i div 10+1,':');readln(tmp);
tong:=tong+tmp;
if i mod 10=0 then
begin
a[i div 10+1]:=tong/10;
tong:=0;
end;
end;
for i:=1 to 4 do write(' diem to ',i,'la: ',a:1:3);
readln;
end.
 
Top Bottom