Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Perimetro y Area (con validaciones)
//fpc 3.0.4 program perimetroyarea; var medida, tipofigura : int64; perimetro, area : real; const pi = 3.14; begin read(tipofigura, medida); if(tipofigura = 0) or (medida = 0) then begin writeln('Se ha ingresado un dato invalido'); halt (1); end; if(tipofigura <> 1) and (tipofigura <> 2) then writeln('Ingrese 1 para perimetros y 2 para areas') else while (tipofigura = 1) or (tipofigura = 2) do begin if(tipofigura = 1) then begin perimetro:= medida*medida; writeln('El perimetro es ',perimetro:0:0); end; if tipofigura = 2 then begin area:=pi*(medida*medida); writeln('El area es ',area:0:0); end; read(tipofigura, medida); if(tipofigura = 0) or (medida = 0) then begin writeln('Se ha ingresado un dato invalido'); halt (1); end; end; end.
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
3
Луноход-4
444555666
НОД не по Евклиду и без массива
test23
https://m.facebook.com/
123
Sorting
Бассейн-5
Obrni listu
Please log in to post a comment.