Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fibonaci(num)
- {
- let temp1=0, temp2=1,i;
- if(num>=1) console.log('1');
- for (i =2;i<=num;i++)
- {
- let temp=temp2;
- temp2+=temp1;
- temp1=temp;
- console.log(temp2);
- }
- }
- // fibonaci(100)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement