program calklin;
uses
crt;
var
a, b, x: real;
begin
textcolor(red);
gotoxy(10, 5);
write('Вас приветствует калькулятор решать линейные уравнения');
gotoxy(10, 6);
write('Введите а=');
readln(a);
gotoxy(10, 7);
write('Введите b=');
readln(b);
gotoxy(10, 8);
if a = 0
then
begin
gotoxy(10, 9);
textcolor(red);
writeln('Нет корней')
end
else
begin
if a <> 0
then
begin
gotoxy(10, 10);
textcolor(red);
x := (-b / a);
writeln('Уравнение имеет корень и он равен: x =', x, '');
end;
end;
end.
из двоичной в шестиричную систему счисления:
1521