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
Discussion Topic
frozen [14]

The advantages of using spreadsheets for managing personal finances is that:

  • Spreadsheets are known to be tools that are very quick and easy and helps one to add into a workflow.
  • Spreadsheets are regarded as an efficient tools for financial documents. A person can have access to a lot of spreadsheet templates and they can be able to visualize data along with caveats.

<h3>What is the advantage of using a spreadsheet?</h3>

The Advantage is that it is one that help[s a person to be able to organizing a lot of data.

Note that The advantages of using spreadsheets for managing personal finances is that:

  • Spreadsheets are known to be tools that are very quick and easy and helps one to add into a workflow.
  • Spreadsheets are regarded as an efficient tools for financial documents. A person can have access to a lot of spreadsheet templates and they can be able to visualize data along with caveats.

Learn more about spreadsheets  from

brainly.com/question/26919847

#SPJ1

6 0
1 year ago
WHAT DOES THE SCRATCH CODE BELOW DO?
Vinil7 [7]
I think it’s b vertically
7 0
3 years ago
How does the dns help the world wide web scale so that billions of users can access billions of web pages?.
valentina_108 [34]

Answer:

domain name systems allow web users to choose where they want to go and to have many different sites

8 0
2 years ago
In a PivotTable, how can a field of data be hidden from the viewer but still be active in calculations made by Excel’s formulas?
Nuetrik [128]
C. The user can select a cell in that field and click “collapse entire field” in the options tab. Is probably not right!
5 0
3 years ago
The most common markup language used with web pages is ___________ Question 4 options: A. HTML B. VRML C. Javascript
leonid [27]
Hi there!

The correct answer is A. HTML.

HTML stands for Hypertext Markup Language which is used in nearly all websites and web-based programs. HTML acts as a structure for a website giving you the text, page titles, text-boxes, etc... HTML is also used along with the languages of Javascript, CSS, C++, and others. DO NOT confuse languages like Javascript and the rest with Markup Languages because they are not the same! Javascript, for example, is what is used to make websites more user-friendly and interactive. When you use Brainly, for example, and you hover over someone's name or picture and that box pops up that is Javascript at work and not HTML or any other Markup Language.

-<span>ASIAX </span><span>  </span><span>Frequent Answerer</span>
4 0
3 years ago
Read 2 more answers
Other questions:
  • Operating systems are often written in ________, a very low-level computer programming language that allows the computer to oper
    10·1 answer
  • python (Business: check ISBN-10) An ISBN-10 (International Standard Book Number) consists of 10 digits: d1d2d3d4d5d6d7d8d9d10. T
    12·1 answer
  • Which of these is not one of the main parts of an email
    9·1 answer
  • Discuss the difference between a broad internet search and a narrow internet search?
    12·2 answers
  • What is a Slide Master? A. the placeholder used to insert objects B. the sequence of slides in a presentation C. the default des
    14·1 answer
  • Your classmate is frustrated because the code that was designed to add up her five quiz grades is not working properly.
    12·1 answer
  • Please Help Me!!!!!!!!!!!!!
    5·1 answer
  • Write a function called no_you_pick. no_you_pick should have two parameters. The first parameter is a dictionary where the keys
    5·1 answer
  • Explain the working principle of computer with suitable diagram​
    15·1 answer
  • HOW TO GET RID OF THESE LINES?? PLS WILL GIVE BRAINLIEST
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!