Program vyrieši ľubovoľnú lineárnu rovnicu
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Author: Pheo
web: pascalsource.ic.cz
Program: Linearna_rovnica.pas
File exe: Linearna_rovnica.exe
Author: Pheo
web: pascalsource.ic.cz
Program: Linearna_rovnica.pas
File exe: Linearna_rovnica.exe
Program vyrieši ľubovoľnú lineárnu rovnicu.
{ LINEARNA_ROVNICA.PAS Copyright (c) Pheo } { Program vyriesi lubovolnu linearnu rovnicu. } { } { Datum:24.04.2003 http://www.trsek.com } program linearna_rovnica; var a,b,x:integer; begin write('zadaj koeficient a:'); readln(a); write('zadaj koeficient b:'); readln(b); if (a=0)and(b=0) then writeln('riesenim su vsetky R cisla') else if (a=0)and(b<>0) then writeln('rovnica nema riesenie') else writeln('X=',-b/a:4:2); ReadLn; end.