Предмет: Информатика,
автор: nastena9692
Помогите пожалуйста решить задачи, которые отмечены галочкой
В паскале.
Заранее благодарю
Приложения:
Ответы
Автор ответа:
0
№1 (164)
var i:integer;
m:array [1..10] of longint;
begin cls;
for i:=1 to 10 do m[i]:=random(15); //рандомно заполняем
for i:=1 to 10 do write(m[i]:4,' '); //выводим элементы
for i:=1 to 10 do m[i]:=m[i]*m[i]; writeln();
for i:=1 to 10 do write(m[i]:4,' ');
end.
№2 (169)
var i,sum:longint;
m:array [1..10] of longint;
begin cls;
for i:=1 to 10 do m[i]:=random(500)-250; //рандомно заполняем
for i:=1 to 10 do write(m[i]:5,' ');writeln(); //выводим элементы
for i:=1 to 10 do beginif m[i]<0 then sum:=sum+m[i];end;
writeln('сумма: ',sum);
end.
№3 (172)
var i,k:longint;
m:array [1..10] of longint;
begin cls;
for i:=1 to 10 do m[i]:=random(5)-3; //рандомно заполняем
for i:=1 to 10 do write(m[i]:5,' ');writeln(); //выводим элементы
for i:=1 to 10 do beginif m[i]<>0 then k:=k+1;end;
writeln('количество ненулевых эл-тов: ',k);
end.
№4 (174)
var i,k,sum:longint;
d:real;
m:array [1..10] of longint;
begin cls;
for i:=1 to 10 do m[i]:=random(15)-3; //рандомно заполняем
for i:=1 to 10 do write(m[i]:5,' ');writeln(); //выводим элементы
for i:=1 to 10 do sum:=sum+m[i]; d:=sum/10;
for i:=1 to 10 do beginif m[i]>d then k:=k+1;end;
writeln('количество эл-тов: ',k);
end.
№5 (179)
var i:integer;
m:array [1..10] of longint;
begin cls;
for i:=1 to 10 do m[i]:=random(15); //рандомно заполняем
for i:=1 to 10 do write(m[i]:4,' '); //выводим элементы
for i:=1 to 10 do begin
if i mod 2=1 then m[i]:=m[i]*m[i];
end; writeln();
for i:=1 to 10 do write(m[i]:4,' ');
end.
Всё :)
var i:integer;
m:array [1..10] of longint;
begin cls;
for i:=1 to 10 do m[i]:=random(15); //рандомно заполняем
for i:=1 to 10 do write(m[i]:4,' '); //выводим элементы
for i:=1 to 10 do m[i]:=m[i]*m[i]; writeln();
for i:=1 to 10 do write(m[i]:4,' ');
end.
№2 (169)
var i,sum:longint;
m:array [1..10] of longint;
begin cls;
for i:=1 to 10 do m[i]:=random(500)-250; //рандомно заполняем
for i:=1 to 10 do write(m[i]:5,' ');writeln(); //выводим элементы
for i:=1 to 10 do beginif m[i]<0 then sum:=sum+m[i];end;
writeln('сумма: ',sum);
end.
№3 (172)
var i,k:longint;
m:array [1..10] of longint;
begin cls;
for i:=1 to 10 do m[i]:=random(5)-3; //рандомно заполняем
for i:=1 to 10 do write(m[i]:5,' ');writeln(); //выводим элементы
for i:=1 to 10 do beginif m[i]<>0 then k:=k+1;end;
writeln('количество ненулевых эл-тов: ',k);
end.
№4 (174)
var i,k,sum:longint;
d:real;
m:array [1..10] of longint;
begin cls;
for i:=1 to 10 do m[i]:=random(15)-3; //рандомно заполняем
for i:=1 to 10 do write(m[i]:5,' ');writeln(); //выводим элементы
for i:=1 to 10 do sum:=sum+m[i]; d:=sum/10;
for i:=1 to 10 do beginif m[i]>d then k:=k+1;end;
writeln('количество эл-тов: ',k);
end.
№5 (179)
var i:integer;
m:array [1..10] of longint;
begin cls;
for i:=1 to 10 do m[i]:=random(15); //рандомно заполняем
for i:=1 to 10 do write(m[i]:4,' '); //выводим элементы
for i:=1 to 10 do begin
if i mod 2=1 then m[i]:=m[i]*m[i];
end; writeln();
for i:=1 to 10 do write(m[i]:4,' ');
end.
Всё :)
Автор ответа:
0
164)
var a: array [1..10] of real;
i: integer;
begin
for i := 1 to 10 do
begin
a[i] := random(100) - 50;
writeln('[', i, '] => ', a[i]);
end;
writeln('------------');
for i := 1 to 10 do
begin
a[i] := sqr(a[i]);
writeln('[', i, '] => ', a[i]);
end;
end.
169)
var a: array [1..10] of real;
i, s: integer;
begin
for i := 1 to 10 do
begin
a[i] := random(100) - 50;
writeln('[', i, '] => ', a[i]);
end;
writeln('------------');
for i := 1 to 10 do
begin
if (A[i] < 0) then s := s + a[i];
end;
writeln(s);
end.
172)
var a: array [1..10] of real;
i, s: integer;
begin
for i := 1 to 10 do
begin
a[i] := random(100) - 50;
writeln('[', i, '] => ', a[i]);
end;
writeln('------------');
for i := 1 to 10 do
begin
if (A[i] <> 0) then s := s + 1;
end;
writeln(s);
end.
174)
var a: array [1..10] of real;
i, s: integer;
b: real;
begin
for i := 1 to 10 do
begin
a[i] := random(100) - 50;
writeln('[', i, '] => ', a[i]);
end;
writeln('------------');
for i := 1 to 10 do
begin
b := b + a[i];
end;
b := b / 10;
for i := 1 to 10 do
begin
if (a[i] > b) then s := s + 1;
end;
writeln(s);
end.
179)
var a: array [1..10] of real;
i, s: integer;
begin
for i := 1 to 10 do
begin
a[i] := random(100) - 50;
writeln('[', i, '] => ', a[i]);
end;
writeln('------------');
for i := 1 to 10 do
begin
if (i mod 2 = 0) then a[i] := sqr(a[i]);
writeln('[', i, '] => ', a[i]);
end;
end.
Вроде так =)
var a: array [1..10] of real;
i: integer;
begin
for i := 1 to 10 do
begin
a[i] := random(100) - 50;
writeln('[', i, '] => ', a[i]);
end;
writeln('------------');
for i := 1 to 10 do
begin
a[i] := sqr(a[i]);
writeln('[', i, '] => ', a[i]);
end;
end.
169)
var a: array [1..10] of real;
i, s: integer;
begin
for i := 1 to 10 do
begin
a[i] := random(100) - 50;
writeln('[', i, '] => ', a[i]);
end;
writeln('------------');
for i := 1 to 10 do
begin
if (A[i] < 0) then s := s + a[i];
end;
writeln(s);
end.
172)
var a: array [1..10] of real;
i, s: integer;
begin
for i := 1 to 10 do
begin
a[i] := random(100) - 50;
writeln('[', i, '] => ', a[i]);
end;
writeln('------------');
for i := 1 to 10 do
begin
if (A[i] <> 0) then s := s + 1;
end;
writeln(s);
end.
174)
var a: array [1..10] of real;
i, s: integer;
b: real;
begin
for i := 1 to 10 do
begin
a[i] := random(100) - 50;
writeln('[', i, '] => ', a[i]);
end;
writeln('------------');
for i := 1 to 10 do
begin
b := b + a[i];
end;
b := b / 10;
for i := 1 to 10 do
begin
if (a[i] > b) then s := s + 1;
end;
writeln(s);
end.
179)
var a: array [1..10] of real;
i, s: integer;
begin
for i := 1 to 10 do
begin
a[i] := random(100) - 50;
writeln('[', i, '] => ', a[i]);
end;
writeln('------------');
for i := 1 to 10 do
begin
if (i mod 2 = 0) then a[i] := sqr(a[i]);
writeln('[', i, '] => ', a[i]);
end;
end.
Вроде так =)
Похожие вопросы
Предмет: Математика,
автор: sagynbaevemirlan
Предмет: История,
автор: mihaillazukov962
Предмет: Математика,
автор: goguk666
Предмет: Биология,
автор: bghrttthrfhtrhg39
Предмет: Математика,
автор: pehtashev1998