Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
calcular_sumatoria_N
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.0 program calcular_sumatoria_N; var n, i, suma : integer; begin read(n); suma := 0; i := 1; while ( i <= n ) do begin suma := suma + i; i := i + 1; end; write('La sumatoria de 1 a ',n,' es ',suma); end.
5
Show compiler warnings
[
-
]
Show input
Compilation time: 0.12 sec, absolute running time: 0.06 sec, cpu time: 0 sec, memory peak: 3 Mb, absolute service time: 0,27 sec
edit mode
|
history
|
discussion
La sumatoria de 1 a 5 es 15