Question: Consider the following code: int n 1 = 1 ; int n 2 = 1 ; final int n = 1 2 ; System.out.println (

Consider the following code:
int n1=1;
int n2=1;
final int n =12;
System.out.println(n1);
for(int i =0; i < n; i++){
int s = n1+ n2;
n1= n2;
n2= s;
System.out.println(n1);
}
What does this code do?
Group of answer choices
Prints two-sum method
Prints logarithms
Prints Fibonacci numbers
Prints exponents
Prints square roots

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!