Displays the diagram of the calculations y = tg(x)/x
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Program: Tangens.pas
File exe: Tangens.exe
flow: Tangens.gif
Program: Tangens.pas
File exe: Tangens.exe
flow: Tangens.gif
Displays the diagram of the calculations y = tg(x)/x.
{ TANGENS.PAS Copyright (c) TrSek alias Zdeno Sekerak } { Zostavte program pre vypocet vztahu y = tg(x)/x } { tg(x) = sin(x)/cos(x) } { } { Datum:04.02.2004 http://www.trsek.com } program tang; uses crt; var x:real; y:real; begin ClrScr; Write('Zadaj x:'); ReadLn( x ); if( cos(x) = 0 ) or ( x = 0 )Then WriteLn('Nieje mozne vypocitat.') else begin y := (sin(x)/cos(x))/x; WriteLn('y=', y:8:3); end; ReadLn; end.