Срочно! Помогите!
Известны баллы, полученные студентами за контрольную работу. Вычислить максимальный балл.
Написать программу в паскале АВС.NET
Ответы
Ответ дал:
0
program maxim;
const n=15 {15 студентов};
var a:array[1..n] of integer;
i,max:integer;
begin
randomize;
for i:=1 to n do begin
a[i]:=random(10){кол-во баллов до 15};
write (a[i],' ');
end;
max:=a[1];
for i:=2 to n do begin
if a[i]>max then max:=a[i];
end;
writeln;
writeln (max);
end.
const n=15 {15 студентов};
var a:array[1..n] of integer;
i,max:integer;
begin
randomize;
for i:=1 to n do begin
a[i]:=random(10){кол-во баллов до 15};
write (a[i],' ');
end;
max:=a[1];
for i:=2 to n do begin
if a[i]>max then max:=a[i];
end;
writeln;
writeln (max);
end.
Вас заинтересует
2 года назад
2 года назад
8 лет назад
8 лет назад
10 лет назад
10 лет назад