76 868
Assignments Done
Successfully Done
In June 2019

Answer to Question #4166 in Java | JSP | JSF for naveen

Question #4166
I want to output 0,1,1,2,3,5,8,13,21,34
Expert's answer
public class Fibonacci{ public static void main(String[] args){
int current = 1;
int previous = 0;
int temp =0;
while (current<50){
temp = current;
current = previous + current;
previous = temp;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions