Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Mostrar un arreglo ( array )
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
var edades : ARRAY [1..5] of integer; i, sum: integer; promedio : real; BEGIN edades[1] := 10; edades[2] := 20; edades[3] := 30; edades[4] := 40; edades[5] := 50; i := 1; sum:= 0; promedio:= 0; while (i <= 5) do begin writeln('Edad ', i, ': ', edades[i]); sum:= sum + edades[i]; i:= i + 1; end; promedio:= sum/i; writeln(sum); writeln('El promedio de las edades es : ',promedio:0:1); end.
Show compiler warnings
[
+
]
Show input
Compilation time: 0.13 sec, absolute running time: 0.18 sec, cpu time: 0.01 sec, memory peak: 5 Mb, absolute service time: 0,54 sec
edit mode
|
history
|
discussion
Edad 1: 10 Edad 2: 20 Edad 3: 30 Edad 4: 40 Edad 5: 50 150 El promedio de las edades es : 25.0