Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Perimetro y Area (con validaciones)
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//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.
1 23 2 92 1 0 0 22
Show compiler warnings
[
-
]
Show input
Compilation time: 0.12 sec, absolute running time: 0.16 sec, cpu time: 0.01 sec, memory peak: 6 Mb, absolute service time: 0,55 sec
edit mode
|
history
|
discussion