-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfibo.ppp
More file actions
34 lines (33 loc) · 816 Bytes
/
fibo.ppp
File metadata and controls
34 lines (33 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
" ----------------------------------------------------"
"| |"
"| Este programa imprime los primeros n numeros |"
"| de la sucesion de Fibonacci (47 max) |"
"| |"
"| https://en.wikipedia.org/wiki/Fibonacci_number |"
"| |"
" ----------------------------------------------------"
"\nIngrese un número:"
n<<n;
k = n;
if(k>=2)
if(k<=47)
i = n-2;
a = 0;
b = 1;
"> "+a
while(i>=0)
"> "+b
aux = a;
a = b;
b = aux+b;
i-=1;
end
end
end
if(k<=2)
"n debe ser mayor a 2"
end
if(k>47)
"n debe ser menor a 47"
k = 0;
end