Ask Question
25 February, 14:13

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. 25 February, 16:13
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers