Computers and Technology, 05.11.2020 07:00 TianaTheSquid
The following code is intended to test whether the int variable num is less than 10, and if so print a warning and set it to 10. The code then prints the value of num.
if (num < 10)
System. out. println( "This is smaller than 10" );
num = 10;
System. out. println("Value of num is " + num);
What correction should be made so the code functions as intended?
An else statement should be added between the 3rd and 4th lines
The final line should be printed every time, not just when num hasnβt been changed.
A semicolon should be added at the end of the first line
The operator β<β should be changed to β<=β in the if statement
No correction should be made
Curly braces β{ }β should be added to enclose the second and third lines
Answers: 1
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
Computers and Technology, 23.06.2019 06:40
How many nibbles can be stored in a 16-bit word?
Answers: 1
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
Computers and Technology, 24.06.2019 03:30
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
The following code is intended to test whether the int variable num is less than 10, and if so print...
English, 24.08.2019 10:50
Mathematics, 24.08.2019 10:50
English, 24.08.2019 10:50
Geography, 24.08.2019 10:50
English, 24.08.2019 10:50
English, 24.08.2019 10:50
Social Studies, 24.08.2019 10:50
English, 24.08.2019 10:50
Chemistry, 24.08.2019 10:50
Biology, 24.08.2019 10:50