//Printing Fibonacci Series Basic Code using for loop
public class Fibonacci {
public static void main (String args[]){
int n1,n2,n3,i;
n1= 0;
n2= 1;
System.out.print(n1+" "+n2); //for printing n1 and n2
for (i=2; i<10; i++){
//loop starts from 2 because two values i.e 0, 1 has been already printed.
n3 = n1+n2;
System.out.print(" "+n3);
n1=n2; //assigning value of n2 to n1
n2=n3; //assigning value of n3 to n2
}
}
}
- Algorithms
- _Searching Algorithms
- __Linear Search Algorithm
- __Binary Search Algorithm
- ___Binary Search: Recursive Implementation
- ___Binary Search: Iterative Implementation
- _Sorting Algorithms
- __Bubble Sort Algorithm
- ___Bubble Sort: Basic Approach
- ___Bubble Sort: Modified Approach
- ___Bubble Sort: Optimised Approach
- __Insertion Sort Algorithm
- _Selection Sort Algorithm
- _Kadane's Algorithm
- _Dutch National Flag Algorithm
- Topics
- _Binary Tree
- _Binary Search Tree
- _Recursion
- _String
- Android Tutorials
- HTML/CSS Tutorials
- Important Questions
Merkur Futur Adjustable Safety Razor - Sears
ReplyDeleteMerkur Futur Adjustable Safety Razor is the perfect balance https://septcasino.com/review/merit-casino/ of kadangpintar performance, safety, ventureberg.com/ and comfort. Made in Solingen, Germany, this razor has a https://tricktactoe.com/ perfect balance of