Const problems : array [0..9] of String = ('x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10','x1+5=10', 'x1+5=10', 'x1+5=10'); answers : array [0..9] of String = ('-5', '-5', '-5', '-5', '-5', '-5', '-5', '-5', '-5', '-5'); var countOfAnswers, counter: integer; userAnswer: String; begin countOfAnswers := 0; for counter:=0 to 9 do begin write('Введите ответ уравнения ', problems[counter], ' : '); readln(userAnswer); if userAnswer = answers[counter] then Inc(countOfAnswers); end; if countOfAnswers > 8 then writeln('Отлично') else if countOfAnswers > 5 then writeln('Хорошо') else writeln('Плохо'); end.
iskypka
29.02.2020
// PascalABC.NET 3.0, сборка 1073 const nn=30; mm=30; var a:array[1..mm,1..nn] of integer; m,n,i,j,imax,imin,jmax,jmin:integer; begin Writeln('Введите число строк и столбцов массива: '); Read(m,n); Randomize; Writeln('*** Исходный массив ***'); imin:=1; jmin:=1; imax:=1; jmax:=1; for i:=1 to m do begin for j:=1 to n do begin a[i,j]:=Random(51)-25; Write(a[i,j]:4); if a[i,j] mod 2 = 0 then begin if a[i,j]<a[imin,jmin] then begin imin:=i; jmin:=j end else if a[i,j]>a[imax,jmax] then begin imax:=i; jmax:=j end end end; Writeln end; Writeln('*** Результирующий массив ***'); for i:=1 to m do begin for j:=1 to n do begin if (i=imin) and (j=jmin) or (i=imax) and (j=jmax) then a[i,j]:=2*a[i,j] else a[i,j]:=3*a[i,j]; Write(a[i,j]:4) end; Writeln end end.
5 3 1 8 6 4 7 2