write a program in java to display the first 10
numbers of the fibonacci series 0, 1, 2, 3,
A program to display the first ten numbers of
the Fibonacci series
public class Fibonacci
public static void main(String args[])
inta, b, c, n; a=0; b=1; c=0; n = 3;
System.out.println ("The Fibonacci series is");
System.out.println (a);
System.out.println (b);
for (i=0; i <= 7; i++)
{
C = a+b;
System.out.println (c);
a = b
b=c
}
}
} predict the output
pls help smone gotta submit it tommorow
Answers
Answered by
0
Answer:
I think i =0 should be i=1
Similar questions
English,
2 months ago
Science,
2 months ago
English,
2 months ago
Computer Science,
4 months ago
Social Sciences,
4 months ago
Science,
10 months ago
Science,
10 months ago