Program rok_ork_kok;var x,y:integer; s:string; c1,c2,c3:char; begin writeln('начать выполнение? Жмите ENTER!'); readln; repeat randomize; x:=random(4); if x = 1 then c1:='р'; if x = 2 then c1:='о'; if x = 3 then c1:='к'; x:=random(4); if x = 1 then c2:='р'; if x = 2 then c2:='о'; if x = 3 then c2:='к'; x:=random(4); if x = 1 then c3:='р'; if x = 2 then c3:='о'; if x = 3 then c3:='к'; s:=c1+c2+c3; writeln(s); until (s='кок') or (s='рок') or (s='орк') ; writeln('получили слово '+s); end.
var a: array[1..100] of real; i, n: integer; sum: real;
begin {ввод массива} if handsfree then n := random(20) + 5 else begin write('n = '); readln(n); end;
writeln('Данные массива:'); for i := 1 to n do begin if handsfree then begin a[i] := random(100) - 50; write(a[i], ' '); end else readln(a[i]); end; writeln();
{подсчет суммы и произведения и агригатов} sum := 0; for i := 1 to n do if a[i] < 0 then {если нужен фильтр} sum := sum + a[i]; writeln('sum = ', sum); end.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку