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]
4 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]4 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
4.5 Code Practice
dmitriy555 [2]

i = 0

while True:

   user_input = input("Please enter the next word: ")

   if user_input == "STOP":

       break

   i += 1

   print("#{}: You entered {}".format(i,user_input))

print("All done. {} words entered.".format(i))

First we set i equal to zero so that we can keep track of how many words we input.

We set while True so that its a continuous loop until a certain condition is met to break out of the loop.

user_input is set equal to whatever word the user enters.

our if statement tells us to break out of the while loop if the user inputs "STOP"

If the user does not enter STOP i is set equal to itself plus 1. This just means we add one to i for every new word entered.

Then we print whichever word is entered.

After the while loop, we print All done and the quantity of words entered.  

7 0
3 years ago
What is 9+10/2x^3?<br><br>Please answer ;D<br>Ratez?
Cerrena [4.2K]

Answer:

5

3

+

9

Explanation:

8 0
3 years ago
In one to three sentences describe one reason you would import data into a datebase
Bond [772]

The primary reason that you would import data into a database is because the data already exists somewhere else.

As an example, you may have a spreadsheet that contains names and telephone numbers of a group of people. It is much faster to import this data into a database instead of manually entering the information.

8 0
3 years ago
_______ codes are supplemental codes used to help researchers collect data, track illness and disease, and measure quality of ca
Gnom [1K]

Answer:

Category II

Explanation:

5 0
2 years ago
Read 2 more answers
A combined counting and logical looping statement may be needed in the following situations: (a). The values stored in a linked
sergejj [24]

Answer:

a i think

Explanation:

5 0
2 years ago
Other questions:
  • Suppose Pentax develops a new photo editing software and negotiates agreements with a Vietnamese manufacturer to assemble most P
    6·1 answer
  • A Uniform Resource Locator (URL) consists of three separate parts: network protocol, host, and web browser.
    11·2 answers
  • What is the difference between hardware and software?
    9·1 answer
  • .____________ is a way to identify and differentiate goods andservices through use of a name or distinctive design element.
    10·1 answer
  • 20 POINTS AND BRAINLIEST TO CORRECT ANSWER
    15·2 answers
  • Use the drop-down menus to complete statements about archiving and backing up data fileArchiving data files manages the size of
    5·2 answers
  • What is a fire wall and how does it work
    6·1 answer
  • Can someone help me with this code please explain it to me in simple way
    15·1 answer
  • what types of physical drives does windows disable defragmenting, but provides another method of optimization?
    5·1 answer
  • Record the issue of 4,000 shares of $5 par value common stock for $35000 cash
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!