Ask Question
12 March, 01:40

Which of the following code displays the area of a circle if the radius is positive. a. if (radius! = 0) System. out. println (radius * radius * 3.14159); b. if (radius > = 0) System. out. println (radius * radius * 3.14159); c. if (radius 0) System. out. println (radius * radius * 3.14159);

+2
Answers (1)
  1. 12 March, 04:28
    0
    d. if (radius > 0) System. out. println (radius * radius * 3.14159);

    Explanation:

    The positive values are those values that are greater than 0 (zero).0 is considered to be nonnegative number it is neither positive nor negative and for a zero radius the area will be 0. As we know the are of the circle is π*radius*radius, and π is 3.14159. So the correct answer matching to this condition is option d.

    Which checks if the radius is greater than 0 then find the radius and print it.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which of the following code displays the area of a circle if the radius is positive. a. if (radius! = 0) System. out. println (radius * ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers