Question: import java.util.Scanner; public class Fibonacci 5 public static void main(String args) 6 7 Scanner input new Scanner (System.in i System.out.print(How many numbers do you want
import java.util.Scanner; public class Fibonacci 5 public static void main(String args) 6 7 Scanner input new Scanner (System.in i System.out.print("How many numbers do you want to have in the sequence?"): 12 int number input.nextInt); 1 13 4 to skip odd number?1n 1-Yesin 2-Noln") 15 int choice input.nextInt): 16 17 if(choice 2) 18 t 19 int x1 20 int x2 1; 21 int x3 1; 22 System.out.println("1\t"+x1); 23 System.out.println("2\t"+x2) 24 for(int i-; ic(number-2): 1+) 25 x3 x1+x2; 26 System.out.print((1+3)+t"); 27 System.out.println(x3): 28 x1 x2; 29 x2 x3; 30 31 32 questions System.out.print("Do you want na
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
