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
Snezhnost [94]
3 years ago
11

Which of the following code displays the area of a circle if the radius is positive. a. if (radius != 0) System.out.println(radi

us * 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); d. if (radius > 0) System.out.println(radius * radius * 3.14159);
Computers and Technology
1 answer:
maw [93]3 years ago
8 0

Answer:

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.

You might be interested in
What is the formula equivalent to the function =SUM(B1:B5)? A. =B1+B5 B. =$B$1+$B$5 C. =B1+B2+B3+B4+B5 D. =$B$1+$B$2+$B$3+$B$4+$
Contact [7]

Given the options, I would choose Option C. =B1+B2+B3+B4+B5.

5 0
3 years ago
Which of the following is true for an API?
navik [9.2K]

Answer:

c

Explanation:

4 0
3 years ago
A DTP firm has published and printed flyers for an upcoming fundraising event. In which section of the flyer would you find the
Annette [7]
Typically the contact details for the firm would be at the bottom of the flyer.

This is to allow room for the main event itself to be advertised in top and central area of the flyer real-estate.
7 0
3 years ago
Read 2 more answers
In distributed dos attacks, the attacker sends messages directly to ________. bots the intended victim of the dos attack backdoo
kirill115 [55]
The word DoS refers to the Disk Operating System. In the case given above, if it happens that there is a distributed DoS attack, the attacker then sends messages directly to the BOTS. Bots refer to internet or web robots. Hope this answer helps. The answer is the first option.
4 0
3 years ago
Select the four tactics that cyber criminals use for stealing information from the list below.
Snowcat [4.5K]
Baiting clickjacking pharming spamming
6 0
2 years ago
Other questions:
  • The memory allocated for a float value is ____ bytes.
    9·1 answer
  • Why does the PC send out a broadcast ARP prior to sending the first ping request
    12·1 answer
  • Interest rate risks would be most relevant to what purchase?
    7·2 answers
  • Compare the logical link control and the media access control. Which of the following is a correct statement?
    7·2 answers
  • Suppose one hundred stores participated in the
    14·1 answer
  • What are the text or graphics that are lighter than the main text located in a document's background called?
    10·1 answer
  • Kim would like to have a simple method for entering data into a database. She should create a _____.
    14·2 answers
  • A _________________ operating system accepts random enquires from remote locations and provides an instantaneous response
    5·1 answer
  • How to beat level 50 in give up robot 2
    5·1 answer
  • Where would you click to see the list of microsoft word styles?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!