subject

After the execution of the following code, what will be the value of num if the input values are 0 3? (assume that console is a scanner object initialized to the standard input device.)

int num = console. nextint();
if (num > 0)
num = num + 13;
else
if (num > = 3)
num = num + 15;

a) 0
b) 3
c) 13
d) 15

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:00
The use of idps sensors and analysis systems can be quite complex. one very common approach is to use an open source software program called running on an open source unix or linux system that can be managed and queried from a desktop computer using a client interface.
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
What is a dashed line showing where a worksheet will be divided between pages when it prints? a freeze pane a split box a page break a print title
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
The hybrid uses 144 to 158 volt batteries.
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
The a great imaginary circle, or reference line, around earth that is equally distant from the two poles and divides earth into the northern and southern hemispheres.
Answers: 1
You know the right answer?
After the execution of the following code, what will be the value of num if the input values are 0 3...
Questions
question
Chemistry, 15.12.2020 04:20
question
Mathematics, 15.12.2020 04:20
question
Mathematics, 15.12.2020 04:20
question
Mathematics, 15.12.2020 04:20
question
Mathematics, 15.12.2020 04:20
Questions on the website: 13722363