What is the result when the following code is run?
Double x = 1;
Double y = 1;
Int i = 0;
Do
{
Y = x / 2;
X = x + y;
I = i + 1;
}
While (x < 2.5) ;
System.out.print(i + " ") ;
A) 1
B) 2
C) 3
D) 4
Correct Answer:
Verified
Q5: What is the output of the following
Q19: What is the sentinel value in the
Q21: What will be the output of the
Q25: Which of the following is the correct
Q29: What will be the range of the
Q63: Given the following code snippet, what should
Q70: What is the output of the code
Q103: How many times does the following loop
Q105: What is the first and last value
Q112: Which of the following activities can be
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents