Program urobi prevod komplexneho cisla z algoritmickeho do goniometrickeho tvaru
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Author: Pheo
web: pascalsource.ic.cz
Program: Komplex_cisla.pas
File exe: Komplex_cisla.exe
Author: Pheo
web: pascalsource.ic.cz
Program: Komplex_cisla.pas
File exe: Komplex_cisla.exe
Program urobi prevod komplexneho cisla z algoritmickeho do goniometrickeho tvaru.
{ KOMPLEX_CISLA.PAS Copyright (c) Pheo } { Program urobi prevod komplexneho cisla z algoritmickeho } { do goniometrickeho tvaru. } { } { Datum:23.03.2005 http://www.trsek.com } program komplex_cisla; var a,alfa,b,ahkc,x:real; begin write('zadaj realnu a imaginarnu zlozku komplex. cisla,a,b<>0:'); read(a,b);writeln; writeln('algebraicky tvar c=',a:0:2,'+i.',b:0:2); ahkc:=sqrt(sqr(a)+sqr(b)); x:=arctan(b/a); alfa:=180*x/pi; write('goniometricky tvar '); write('c=',ahkc:0:2,'(cos(',alfa:0:2,')+i.sin(',alfa:0:2,'))'); writeln; readln; end.