Goodnight. I work in PascalABC.Net. I spent a lot of time with the input control and eventually made it, but now he only reads the variable s and, accordingly, the solution does not, however, if you put "readln (n);" behind it, in order to read this variable, he does it separately from input control, i.e. first there is an input control and displays an error message in the case of entering letters, but after pressing ENTER, it starts reading the variable "n", for which the input control is not working. Screen attached. So here I am again stumped. Here is a piece of code:
uses crt; const num=5; c=0.00000001; {Константа для обхода деления на 0} var a: array [1..num,1..num] of real; b, e: array [1..num] of real; n, i, j, k: integer; delenie: real; v:integer; s:string; x:real; begin clrscr; writeln('Решение СЛАУ по методу Гаусса.'); repeat writeln; writeln('Введите колич-во неизвестных величин и нажмите ENTER:'); readln(s);{читаем строку} val(s,x,v);{пытаемся преобразовать ее в число, в переменную C - упадет позиция, с недопустимым символом} if v<>0 then writeln('Должно быть число'); until v=0; readln(n); begin writeln; writeln('Вводите коэфф-ты матpицы A по стpокам нажимая ENTER:'); for k:=1 to n do for j:=1 to n do begin write ('a[',k,',',j,']='); read(a[k,j]); end; writeln; writeln('Введите вектоp В свободных членов нажимая ENTER:'); for k:=1 to n do begin write ('b[',k,']='); read (b[k]); end;
read(a\[k,j\]);? - Igor