Turns the number upside down
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Program: Otoc.pas
File exe: Otoc.exe
Program: Otoc.pas
File exe: Otoc.exe
Turns the number upside down.
{ OTOC.PAS Copyright (c) TrSek alias Zdeno Sekerak } { Otoci cislo naopak } { Vstup : 5 cisel x-tej zlozky funkcie } { Vystup: 5 cisel funkcie y=e^(x+1) } { } { Datum:10.04.2000 http://www.trsek.com } program Otoc_cislo; uses crt; var pole:array[1..5] of real; i:integer; pom:real; begin Clrscr; for i:=1 to 5 do begin Write('pole[',i,']='); ReadLn( pole[i] ); end; WriteLn; WriteLn('Pre funkciu y=xe^(x+1) su nasledovne hodnoty:'); for i:=1 to 5 do begin pom := pole[i] * exp( pole[i]+1 ); WriteLn( pom:9:2 ); end; ReadLn; end.