Biology Forums - Study Force

Science-Related Homework Help Computer Studies Topic started by: gcd99br on May 5, 2020



Title: Which of the following code displays the area of a circle if the radius is positive?
Post by: gcd99br on May 5, 2020
Which of the following code displays the area of a circle if the radius is positive?

▸ if (radius <= 0) System.out.println(radius * radius * 3.14159);

▸ if (radius != 0) System.out.println(radius * radius * 3.14159);

▸ if (radius >= 0) System.out.println(radius * radius * 3.14159);

▸ if (radius > 0) System.out.println(radius * radius * 3.14159);


Title: Which of the following code displays the area of a circle if the radius is positive?
Post by: vande746 on May 5, 2020
Content hidden