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
Please
levacccp [35]

Answer:

inspect

Explanation:

7 0
2 years ago
Someone who wants to learn a skilled trade on the job should consider
Alexeev081 [22]
Someone who wants to learn a skilled trade on the job should consider enrolling in class for the knowledge and skills.
5 0
3 years ago
Read 2 more answers
Type the correct answer in the box. Spell all words correctly. Joseph is a digital media developer and has years of work experie
Damm [24]

It is better to develop soft skills. Irrespective of profession, soft skill is a common skill which is required to be present in everyone to move along with others and continue the work successfully. A person who is good at technical need soft skill to work in collaboration with others, manage team, solve problems, etc.

So there are separate soft skill training provided for various roles and years of experience. So, I suggest to have soft skill training and do additionally MBA degree.

5 0
3 years ago
Write a program that uses an STL List of integers. a. The program will insert two integers, 5 and 6, at the end of the list. Nex
poizon [28]

Answer:

answer:

#include <iostream>

#include<list>

using namespace std;

bool Greater(int x) { return x>3; } int main() { list<int>l; /*Declare the list of integers*/ l.push_back(5); l.push_back(6); /*Insert 5 and 6 at the end of list*/ l.push_front(1); l.push_front(2); /*Insert 1 and 2 in front of the list*/ list<int>::iterator it = l.begin(); advance(it, 2); l.insert(it, 4); /*Insert 4 at position 3*/ for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " "; /*Display the list*/ cout<<endl; l.erase(it); /*Delete the element 4 inserted at position 3*/ for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " "; /*Display the list*/ cout<<endl;

l.remove_if(Greater); for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " ";

/*Display the list*/

cout<<endl; return 0;

}

5 0
3 years ago
Read 2 more answers
What is the purpose of a register in a CPU? Describe three types of registers.
Ganezh [65]

Answer:

I hope this answer is correct

Explanation:

Internal registers include the instruction register (IR), memory buffer register (MBR), memory data register (MDR), and memory address register (MAR). The instruction register fetches instructions from the program counter (PC) and holds each instruction as it is executed by the processor.

5 0
3 years ago
Other questions:
  • To keep information beyond reach of unauthorized users, is to keep the information _____. Group of answer choices simple verifia
    7·1 answer
  • What is one concern associated with web-based applications?
    12·1 answer
  • About.com is considered a (an):
    6·1 answer
  • Which of the following is considered part of the process in the systems thinking example of a TPS?
    6·1 answer
  • Cognitive psychology is the scientific study of what
    9·1 answer
  • Oiê gentee, bom dia O que você entende por cultura digital ??
    12·1 answer
  • (Convert milliseconds to hours, minutes, and seconds) Write a function that converts milliseconds to hours, minutes, and seconds
    12·1 answer
  • 15) Three primary activities of a program are: A) Variables, Operators, and Key Words B) Lines, Statements, and Punctuation C) I
    11·1 answer
  • Im lonellly whos down to date me
    7·2 answers
  • Why doesn't the ad load ?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!