What is the value of y after the following code is executed?
int x = 20, y = 30;
do
{
int z;
z = 3 * ( y
please rate - thanks
int x = 20, y = 30;
do
initially
2 nd time through
loop
3rd
time
4th time
{
x
y
z
int
z;
20
30
z = 3 * ( y
What is the value of y after the following code is executed? int x = 20,...
What will be the value of x after the following code is executed? int x = 5; while (x <50) { x += 5; } a) 50 b) 45 c) Infiniteloop d) 55 Given the following code segment: Scanner in = new Scanner (System.in); boolean done = false; while (!done) { int input = in.next(); if(input.equalsIgnoreCase("q")) done = false; } What will cause the loop to terminate? a) When the user enters -1 b) The loop will never terminate c)...
1. What will be the value of x after the following code is executed? int x = 10, y = 20; while (y < 100) { x += y; } A. 90 B. 110 C. 210 D. This is an infinite loop 2. If a superclass has constructor(s): A. then its subclass must initialize the superclass fields (attributes). B. then its subclass must call one of the constructors that the superclass does have. C. then its subclass does not inherit...
2. What is the value of x alter the following code is executed # include<iostream> using namespace std; int main int t-0, c- 0,x-3; while (c < 4) t=t+x; cout << x return 0; a) 3 b) 21 c) 24 d) 48 3. What is the output of the following code? # include<iostream> using namespace std; int main0 int a- 3; for (int i 5; i >0; i) a a+i cout << a << “ “ return 0; d) 8...
Given the following code segment, int x = 20; int y = 7; what is the data type of the value of the expression (x % y) ? (3 points) Question 1 options: 1) int 2) double 3) numeric 4) Error: possible loss of precision 5) Unable to be determined Question 2 (3 points) Given the following code segment, double x = 42.3; double y = 11.7; what is the data type of the value of the expression (x %...
What will be the value of x after the following code is executed? How many times will the following do-while loop be executed?
Question 16 What is the value of x after the following code is executed? X = 7 If x < 7 X = x + 1 X = x + 2 7 9 10 8
java by the way What is the value of the variable y after the following code is executed? int x = 10; int y = 0; while (x > 0) { x = x / 2; y++; } 4 3 2 1
In the code given below, how many times the cout statement is executed? for (int x = 0; x< 10; x++) for (int y=0; y < 10; y++) for (int z = 0; z <=10; z++) cout << X+y+z;
After the following declarations and statements are executed: int i, j, k ; boolean c; float x, y, z; int[ ] num = {4, 1, 2, 3, 8}; i = 3; j = 5; x = 4.3; y = 58.209; c = !(i > j) ; what is the value of c
Question 21 What will be the results after the following code is executed? int[] arrayi = new int [25]; // Code that will put values in array1 int value = array1[0]; for (int a = 1; a < array1.length; a++) مه if (arrayl[a] < value) value = arrayi[a]; value contains the sum of all the values in arrayi value contains the lowest value in array1 value contains the average of all the values in array value contains the highest value...