Write a programming using java to check Fabbonic number
Answers
Answer:
Java Program to Generate Fibonacci Numbers
public class Fibonacci.
int n, a = 0, b = 0, c = 1;
Scanner s = new Scanner(System.
System. out. print("Enter value of n:");
n = s. nextInt();
System. out. print("Fibonacci Series:");
for(int i = 1; i <= n; i++)
a = b;
Answer:
you didn't answered my question...but still i am answering it.... you told that how can we draw a diagram here so here is ur question's answer
there is an icon of attachment u can share it here and i can see it !
class FibonacciExample1{
public static void main(String args[])
{
int n1=0,n2=1,n3,i,count=10;
System.out.print(n1+" "+n2);//printing 0 and 1
for(i=2;i<count;++i)//loop starts from 2 because 0 and 1 are already printed
{
n3=n1+n2;
System.out.print(" "+n3);
n1=n2;
n2=n3;
}
}}
hope it helps!
plz mark me as brainliest!
thanks !
welcome :) !!!!
Explanation: