1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aleksley [76]
2 years ago
6

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

Computers and Technology
1 answer:
hoa [83]2 years ago
6 0

The only correction I see is you need to add curly braces to enclose the second and third lines.

You might be interested in
The Olympic Games that people celebrate today are much different from the Olympics that began in ancient Greece. When the Olympi
kiruha [24]

Answer:

D

Explanation:

Option D explains the best about Olympic games. previously only few games were in Olympics but now thee are variety of games and some more games are trying to be a part of future Olympic games as well. There is no explanation about other options so we discarded those options, Which includes A) Greek mythology says that the Olympics were started by Heracles. B) Women were not allowed to watch the Olympic Games in ancient Greece. C) The ancient Olympics included sport such as running and chariot racing.

8 0
3 years ago
Read 2 more answers
The term “frivolous” implies that the author
tiny-mole [99]
Thank you for posting your question here at brainly. I hope the answer will help you. Feel free to ask more questions.
believes that the average individual does not need a smart phone 
<span>firivolous mean not serious, light, unimportant.</span>

3 0
3 years ago
Tyesha is trying to create a resume using a template on Word, but she can not figure it out. What wrong step does she make in th
abruzzese [7]
Heading selection on Word Document
8 0
3 years ago
How do you think calculator of a computer works? describe the procedure.
Leviafan [203]

Explanation:

calculators work by processing information in binary form. We're used to thinking of numbers in our normal base-ten system, in which there are ten digits to work with: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The binary number system is a base-two system, which means there are only two digits to work with: 0 and 1. Thus, when you input numbers into a calculator, the integrated circuit converts those numbers to binary strings of 0s and 1s.

The integrated circuits then use those strings of 0s and 1s to turn transistors on and off with electricity to perform the desired calculations. Since there are only two options in a binary system (0 or 1), these can easily be represented by turning transistors on and off, since on and off easily represent the binary option

Once a calculation has been completed, the answer in binary form is then converted back to our normal base-ten system and displayed on the calculator's display screen.

8 0
3 years ago
What does remedial mean
Lesechka [4]
Remedial maintenance (corrective maintenance) Maintenance that is performed after a fault, in hardware or software, has been found, in order to correct that fault.
7 0
2 years ago
Read 2 more answers
Other questions:
  • What OS has a large market share but is limited because it can be installed only on one particular brand?
    8·2 answers
  • Using the phase plane program, plot the phase plane for the Lotka-Volterra model:
    11·1 answer
  • HELP 10 POINTS
    5·1 answer
  • Internet is for everyone but it wont be if its users cannot protect their privacy and the confidentiality of transactions conduc
    6·1 answer
  • A posting error is:
    8·1 answer
  • Several NEC® sections contain the requirement to size conductors and overcurrent devices at 100 percent of the noncontinuous loa
    15·1 answer
  • What is the number reason for conflict on a team?
    12·1 answer
  • a term to describe article that can be displayed in their entirety as opposed to abstract and reference only?​
    10·1 answer
  • How do you write a multiplication formula in excel with an absolute refrence?
    11·1 answer
  • a printer's accessory list includes a maintenance kit with a variety of replaceable parts you should install after 100,000 pages
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!