Type point=record x: integer; y: integer; end; var p1, p2, p3, p4 : point; function length(p1, p2 : point) : real; begin length : = sqrt(sqr(p1.x - p2.x) + sqr(p1.y - p2.y)); end; begin readln(p1.x, p1.y); readln(p2.x, p2.y); readln(p3.x, p3.y); readln(p4.x, p4.y); if (length(p1, p2) = length (p3, p4)) and (length(p3, p2) = length (p1, p4)) then writeln('p = ', abs(2 * (length(p1, p2) + length(p3, p2)) )) else writeln('no'); end.
alexeylipatov
24.11.2020
А)uses crt; const n=20; var a: array[1..n] of integer; i,s,k: integer; begin randomize; s: =0; k: =0; for i: =1 to n do begin a[i]: =random(100)-50; writeln(a[i]); end; writeln; for i: =1 to n do begin if (a[i] mod 2=0) and (i mod 2 =0) and (a[i]< 0) then begin inc(k); s: =s+a[i]; end; end; writeln(s); writeln(k); end. б)uses crt; const n=20; var a: array[1..n] of integer; i,s,k: integer; begin randomize; s: =0; k: =0; for i: =1 to n do begin a[i]: =random(100)-50; writeln(a[i]); end; writeln; for i: =1 to n do begin if (a[i]mod 3=0) and (a[i] mod 5< > 0) then begin s: =s+a[i]; inc(k); end; end; writeln(s); writeln(k); end. в)uses crt; const n=20; var a: array[1..n] of integer; i,s,k: integer; begin randomize; s: =0; k: =0; for i: =1 to n do begin a[i]: =random(100)-50; writeln(a[i]); end; writeln; for i: =1 to n do begin if (abs(a[i]))> (i-2) then begin inc(k); s: =s+a[i]; end; end; writeln(s); writeln(k); end.
Ответить на вопрос
Поделитесь своими знаниями, ответьте на вопрос:
Информатика 8 класс python проверьте, правильно ли