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
tekilochka [14]
2 years ago
7

Write a program that takes the radius of a sphere (a floating-point number) as input and then outputs the sphere’s: Diameter (2

× radius) Circumference (diameter × π) Surface area (4 × π × radius × radius) Volume (4/3 × π × radius × radius × radius)
Computers and Technology
1 answer:
SashulF [63]2 years ago
8 0

Answer:

#include<iostream>

using namespace std;

int main(){

   float radius;

   cout<<"Enter the radius of the sphere: ";

   cin>>radius;

   float diameter = 2*radius;

   float circumference = diameter * 3.14;

   float surface_area = 4*3.14*radius*radius;

   float volume = (4/3)*3.14*radius*radius*radius;

   cout<<"The diameter is: "<<diameter<<endl;

   cout<<"The circumference is: "<<circumference<<endl;

   cout<<"The surface area is: "<<surface_area<<endl;

   cout<<"The volume is: "<<volume<<endl;

}

Explanation:

First include the library iostream for input/output in c++ programming.

then, create the main function and declare the variable radius as floating type.

Use cout to print the message on the screen.

Use cin to store the value in the variable.

After that, write the formula to calculate the values and store the results in the variables.

and finally print the result with message.

You might be interested in
A customer service representative for an Internet provider uses various techniques to help a frustrated customer with a slow Int
tia_tia [17]

Answer:

“Think of it this way: When we’re done, your connection will be faster than it ever was before.”

Correct label:

positive reappraisal

“Okay, let’s put the connection speed issue aside for later and work on changing your password for our company website.”

Correct label:

distraction

“At least your router isn’t talking back at you! I can’t get my digital assistant to shut up.”

Correct label:

humor

Explanation:

4 0
3 years ago
Which of the following problems is least likely to be solved through grid computing? Financial risk modeling Gene analysis Linea
gregori [183]

Answer:

Linear problems

Explanation:Grid computing is the term used in Information technology, Computer programming and Computer networks to describe the interconnection of different Computer resources in order to achieve certain specified goal. GRID COMPUTING ALLOWS COMPUTER RESOURCES TO WOK AS A SINGLE UNIT.

Grid computing can be used to solve various issues connected with the use of Computer resources such as Financial risk modelling,Gene analysis etc but least likely to be used to solve Linear problems.

6 0
3 years ago
The BaseballPlayer class stores the number of hits and the number of at-bats a player has. You will complete this class by writi
Rzqust [24]

Answer:

Answered below

Explanation:

Class BaseballPlayer{

//Instance variables

string name;

int hits;

int bats;

//Constructor

BaseballPlayer (string a, int b, int c){

name = a;

hits = b;

bats = c

}

public void printBattingDetails( ){

System.out.print(name, hits, bats)

}

}

//Demo class

Class BaseballTester{

public static void main (String args []){

BaseballPlayer player = new BaseballPlayer("Joe", 8, 4)

player.printBattingDetails( )

}

}

8 0
2 years ago
The measure of error in keyboardist is called?​
Dimas [21]
Jjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
8 0
2 years ago
Gas giants have rings and satellites.
user100 [1]
Gas giants DO have rings and satellites.
It's true.
6 0
3 years ago
Read 2 more answers
Other questions:
  • Given that a function receives three parameters a, b, c, of type double, write some code, to be included as part of the function
    9·1 answer
  • When you write a C# program that stores a value in a variable, you are using temporary storage; the value you store is lost when
    12·1 answer
  • list the six external parts or "peripherals" of a computer system and identify which are output and which are input devices.
    15·1 answer
  • A(n) _________ is any system resource that is placed onto a functional system but has no normal use for that system. If it attra
    15·1 answer
  • If you wanted to find out whether an integer contained an even number of 1 bits, which status flag would be useful
    11·1 answer
  • Write a program name Dollars that calculates and displays the conversion of an entered number of dollars into currency denominat
    11·1 answer
  • Does anyone know where online I can buy the MacBook Air 2017 at I can’t find any I’ll give brainlist and points
    5·1 answer
  • Select the correct answer. Which sign or symbol will you use to lock cells for absolute cell reference?
    9·2 answers
  • In two to three sentences, define "home row" and explain why it is important.
    6·2 answers
  • A user calls the help desk reporting that a laptop with Linux freezes on startup and displays kernel panic. What could cause thi
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!