Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
test24
//fpc 3.0.4 {record with variable part "case"} program test24; type fig=(circle,quadra); Figure=record case f:fig of circle:(r:real); quadra:(a,b:real) {"a" gets the space of "r"} end; var q:Figure; function square(x:Figure):real; begin with x do case f of circle: square:=3.14*sqr(r); quadra:square:=a*b ; end; end; begin with q do begin f:=quadra; r:=10; b:= 3; writeln(r:2:1); writeln(b:2:1); writeln(square(q):2:1) ; end; end.
run
|
edit
|
history
|
help
0
6
Blanko char
C:\Users\skava\Documents\Паскаль
janja - naloga 2 - 11.7.2013
zad27-notoptimal
123456
abcd...
2
buscar_numero_V2_divisible_5
test22