tttttrrr
17.07.2022 05:24

КАК МОЖНО БЫСТРЕЕ.ПЛАЧУ НЕ ВАЖНО КАКОЙ ЯЗЫК ПРОГРАММИРОВАНИЯ. ГЛАВНОЕ КАК МОЖНО БЫСТРЕЕ
Задание на фото.Если успеете за 30 минут.Накину еще


КАК МОЖНО БЫСТРЕЕ.ПЛАЧУ НЕ ВАЖНО КАКОЙ ЯЗЫК ПРОГРАММИРОВАНИЯ. ГЛАВНОЕ КАК МОЖНО БЫСТРЕЕ Задание на ф

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Алина11117784884848
17.06.2020 08:23
1.
Const N = 10;
Var i,S:integer; m:array [1..N] of integer;
Begin       
randomize;  S:=0;       
 for i:=1 to N do begin       
 m[i]:= random(201)-100;       
 writeln(m[i]);       
end;       
for i:=1 to N do       
 if m[i] mod 2 = 0 then       
 S:=S+m[i];       
writeln('Summa = ',S);         
readln;
end.

2.
Const N = 100;
Var i,p:integer; B:array [1..N] of integer;
Begin       
randomize;  p:=0;       
for i:=1 to N do begin       
B[i]:= random(201)-100;       
 writeln(B[i]);       
end;       
for i:=1 to N do       
 if B[i] mod 3 = 0 then       
 p:=p*B[i];       
writeln('Proiz = ',p);         
readln;
end.
0,0(0 оценок)
Ответ:
stolyarovsemen
22.04.2021 20:53
Program HardZadacha;
Var 1,2,3,4,5,6,7,8,9,0:array [0..5] of integer;
       a,i,x:integer;
begin
Writeln('Введите целое число :  ');
Read(a);
for i:=1 to 5 do
begin
if a mod 10 =0 then 0[i]:=0[i]+1;
if a mod 10 =1 then 1[i]:=1[i]+1;
if a mod 10 =2 then 2[i]:=2[i]+1;
if a mod 10 =3 then 3[i]:=3[i]+1;
if a mod 10 =4 then 4[i]:=4[i]+1;
if a mod 10 =5 then 5[i]:=5[i]+1;
if a mod 10 =6 then 6[i]:=6[i]+1;
if a mod 10 =7 then 7[i]:=7[i]+1;
if a mod 10 =8 then 8[i]:=8[i]+1;
if a mod 10 =9 then 9[i]:=9[i]+1;
a:=a mod 10;
end;

for i:=2 to 5 do
begin
if 0[i]+0[i-1]>1 then x:=1; 
if 1[i]+1[i-1]>1 then x:=1; 
if 2[i]+2[i-1]>1 then x:=1; 
if 3[i]+3[i-1]>1 then x:=1; 
if 4[i]+4[i-1]>1 then x:=1; 
if 5[i]+5[i-1]>1 then x:=1; 
if 6[i]+6[i-1]>1 then x:=1; 
if 7[i]+7[i-1]>1 then x:=1; 
if 8[i]+8[i-1]>1 then x:=1; 
if 9[i]+9[i-1]>1 then x:=1; 
end;
if x=1 then writeln('Есть повторяющие цифры') else writeln('Нет повторяющихся цифр');
end.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота