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
Kamila [148]
3 years ago
11

Which of the following code displays the area of a circle if the radius is positive? Question 4 options: if (radius <= 0) Sys

tem.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);
Computers and Technology
1 answer:
Marina CMI [18]3 years ago
3 0

Answer:

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

Explanation:

Given

Code segment (a) to (d)

Required

Which is correct

Code segment (a): radius <=0

This means that radius is 0 or less, i.e. 0 or negative

Code segment (b): radius !=0

This means that radius is not equal to 0 i.e. it could be positive or negative but definitely not 0

Code segment (c): radius >=0

This means that radius is 0 or greater, i.e. 0 or positive

Code segment (d): radius >0

This means that radius is  greater than 0 i.e. positive

<em>Hence, (d) is correct</em>

You might be interested in
Hello i need help whats -5 = 500
Effectus [21]

Answer:

0=505???

Explanation:

7 0
3 years ago
Read 2 more answers
1.Which of the serves as the basis for determining whether an object has moved or not?
Harrizon [31]

Answer:

1. b

2. c

3. b

4. d

5. a

(hope this helped)

4 0
2 years ago
George is only familiar with VGA connector for monitors. What should you tell him are the main differences between VGA and DVI c
lara [203]

Answer:

That a DVI connector looks different and that it support more monitors.

Explanation:

3 0
3 years ago
6.8 Code Practice<br> please can have some help please
babymother [125]
Sure what is the question though
7 0
3 years ago
Which commas is used to combine two or more cells together into one cell
AURORKA [14]
The command is Merge & Center
This command could be easily found in the toolbar of your excel.
If you execute this command in two different cells, those cells will be merged into one larger cell and the content in that cells will be placed exactly in the middle of the combined cell (measures according to combined cells' length)
5 0
3 years ago
Other questions:
  • 24 bit or 16 million colors is often called?
    7·1 answer
  • There are two activities on your schedule, which are: 1) install server in lab 2) move server into the data center. however, the
    6·1 answer
  • Consider the following implementation of a class Square:
    12·1 answer
  • What are three reasons teens might start drinking alcohol??
    7·2 answers
  • how to answer the questions on brainly? I've typed my answer in the box but there's no submit button or whatever, and the only t
    14·2 answers
  • A company accidentally sends a newsletter with a mistyped website address. The address points to a website that has been spoofed
    8·1 answer
  • You need to subnet a network that has 5 subnets, each with at least 16 hosts. Which classful subnet mask would you use?A. 255.25
    12·1 answer
  • Which background-repeat value represents this div?
    6·1 answer
  • Can i eat chicken and you shut
    14·2 answers
  • Question in photo below
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!