Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Fibonacci series

# Write a program to print fibonacci series upto n terms in python
num = 10
n1, n2 = 0, 1
print("Fibonacci Series:", n1, n2, end=" ")
for i in range(2, num):
    n3 = n1 + n2
    n1 = n2
    n2 = n3
    print(n3, end=" ")

print()
Source by prepinsta.com #
 
PREVIOUS NEXT
Tagged: #Fibonacci #series
ADD COMMENT
Topic
Name
1+6 =