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]
3 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]3 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
Why is it a good idea to only use one word for everything you create in Scratch, even though you can technically use two words f
Keith_Richards [23]

Answer:So if your in a situation where you need 1 of those words then your strategy would come in handy.

Explanation:

7 0
2 years ago
A major weakness of a lot of file processing systems is that ____.
Gnesinka [82]

They are several weaknesses or disadvantages of file processing systems but the major weakness is data redundancy and inconsistency. By data redundancy, I mean duplication of data. There are no better methods to validate insertion of duplicate data in file systems. Data redundancy can also increase the chance for errors.






7 0
4 years ago
Write a complete c++ program using function and array.​
lana66690 [7]

Answer:

Index Value Hash

0 1 $

1 2 $$

2 3 $$$

3 4 $$$$

4 5 $$$$$

Explanation:

8 0
3 years ago
If you were practicing keyboarding and the excercise contained the letters q,o,e,p,r and t, what section of the keyboard are you
AfilCa [17]
Top row keys i belive sorry if im wrong

3 0
3 years ago
What are some advantages and disadvantages of streaming and downloading?
stepladder [879]

Answer:

Pro Cons

It is possible to download legitimate music files that do not include DRM and so makes it easier for you to listen to your tracks on different devices. The file may include DRM protection that you were not expecting when you joined the service. Read the fine print.

Explanation:

7 0
3 years ago
Other questions:
  • #Imagine you're writing a program to check if a person is
    8·1 answer
  • Write a Java program to print the result in the series 10, 15, 20, 25, ..., 50. Hint: You can use an iteration statement for wri
    9·1 answer
  • How do you mark somebody the brainliest?
    14·2 answers
  • In terms of functionality and purpose, how does Nano compare to Server Core?
    10·1 answer
  • An installed theme can be applied by clicking on a theme in the themes group on the ____ tab.
    7·2 answers
  • A user reports that a workstation is continually rebooting. What can a technician do to stop the rebooting in order to troublesh
    12·1 answer
  • Use the drop-down menus to complete statements about options for inserting video files.
    15·1 answer
  • Sypherpk is good go sub 2 him
    6·2 answers
  • You cannot then move and resize the control on the form as desired with your mouse TRUE OR FALSE​
    6·2 answers
  • bailey reads wikis at the beginning of his research project to get his bearings on the topic. he switches to peer-reviewed journ
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!