Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
fb_series
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
#include <iostream> using namespace std; int fib(int n) { if (n<=1) { return n; } return fib(n-1)+fib(n-2); } int main () { int n; cout<<"Enter a number : "<<endl; cin>>n; int sum=fib(n); cout<<"Element at position "<<n<<" is : "<<sum<<endl; system("pause"); }
g++
7
Show compiler warnings
[
+
] Compiler args
[
-
]
Show input
Compilation time: 0.53 sec, absolute running time: 0.21 sec, cpu time: 0.12 sec, memory peak: 3 Mb, absolute service time: 0,74 sec
edit mode
|
history
|
discussion
Error(s):
sh: 1: pause: not found
Enter a number : Element at position 7 is : 13