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
The February Revolution occurred in January.<br><br><br> True<br> False
zimovet [89]
The answer would be false. 
7 0
2 years ago
Read 2 more answers
Is the following a true statement in our world? Why or why not?
posledela

Answer:

The statement would be true

.

Explanation:

let,  L = is a NFL player

      M = teaches in CSU

      N = has tattoos

Given that:

nfl player who teaches in csu = L^ M                 (this is false every time)

Above statement is L ^ M -> N

this would be true because

false -> true                  (true

)

false -> false                  (true

)

Second  exp:

There are no players who teach in Csu therefore if we say they all have tattoos statement would be true.

4 0
3 years ago
Consider the following two code segments: Segment 1: while (k &gt; 0) { System.out.println(k); k--; } --------------- Segment 2:
zepelin [54]

Answer:

Always same value

Explanation:

These both code segments will always generate identical values given that we provide same value of k to both segments.

You can see attached pictures.

6 0
3 years ago
The computers in the administrative offices of the four schools throughout the district are networked to enable employees to acc
muminat
These computers in administrative offices or schools throughout the district that are networked to each other has the type of network most likely used by the workers is LAN network. Usually LAN networks are used in small offices or rooms.
3 0
3 years ago
Write an expression that continues to bid until the user enters 'n'. Sample output with inputs: 'y' 'y' 'n' I'll bid $7! Continu
Likurg_2 [28]

Answer:

#include <iostream>

#include <cstdlib>  

using namespace std;

int main() {

  char Keep_Going = '-';

  int nextBid = 0;

  srand(5);

  while (Keep_Going != 'n') { //<-- solution

     nextBid = nextBid + (rand()%10 + 1);

     cout << "I'll bid $" << nextBid << "!" << endl;

     cout << "Continue bidding? ";

     cin >> Keep_Going;

  }

  cout << endl;

  return 0;

}

4 0
3 years ago
Other questions:
  • All of the following are incentives proprietary schools use to attract a student except
    7·2 answers
  • The create_python_script function creates a new python script in the current working directory, adds the line of comments to it
    9·1 answer
  • ______ is an example of unauthorized access to your computer or accounts.
    14·1 answer
  • Which is the correct process for attaching a file?
    12·1 answer
  • What help in executing commands quickly
    5·1 answer
  • Anyone know what this is pls help
    11·1 answer
  • Help me please I’m failing
    11·1 answer
  • Which of these five are Netflix Originals?1/5
    5·1 answer
  • 4.2.5 codehs text messages answer
    9·1 answer
  • The density of mercury is 13.6 grams per cubic centimeter. Complete the steps for converting 13.6 g/cm3 to kg/m3.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!