Calculates the circumference of a cube
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Program: Kocka.pas
File exe: Kocka.exe
Program: Kocka.pas
File exe: Kocka.exe
Calculates the circumference of a cube.
Formula for circumference is 3·4·a.
Formula for surface is 6·a².
Formula for capacity is a³.
Description:
- a is length
Formula for circumference is 3·4·a.
Formula for surface is 6·a².
Formula for capacity is a³.
Description:
- a is length
{ KOCKA.PAS Copyright (c) TrSek alias Zdeno Sekerak } { Vypocita obvod, povrch, objem kocky } { Vstup : rozmer hrany kocky } { Vystup: obvod, povrch, objem kocky } { } { Datum:10.04.2000 http://www.trsek.com } program kocka; uses crt; var a,obvod: real; objem: real; povrch: real; begin Clrscr; Write('Zadaj stranu kocky:'); ReadLn(a); obvod :=3*4*a; povrch:=6*a*a; objem :=a*a*a; WriteLn('Obvod kocky pre stranu:',a:5:2,' je ', obvod:5:2); WriteLn('Povrch kocky pre stranu:',a:5:2,' je ',povrch:5:2); WriteLn('Objem kocky pre stranu:',a:5:2,' je ', objem:5:2); Readln; end.