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
jek_recluse [69]
3 years ago
12

Volume of Pyramid = A*h/3 where A is the area of the base of the pyramid and h is the height of the pyramid. Write a C++ program

that asks the user to enter the necessary information about the pyramid (note that the user would not know the area of the base of the pyramid, you need to ask them for the length of one of the sides of the base and then calculate the area of the base). Using the information the user input, calculate the volume of the pyramid. Next display the results (rounded to two decimal places). Example Output (output will change depending on user input): The area of the base of the pyramid is: 25.00 The height of the pyramid is: 5.00 The volume of the pyramid is: 41.67 *Pseudocode IS required for this program and is worth 1 point. The program IS auto-graded.
Computers and Technology
1 answer:
insens350 [35]3 years ago
4 0

Answer:

#include <iostream>

#include <iomanip>

using namespace std;

int main()

{

   double side, height;

   

   cout<<"Enter the length of one of the sides of the base: ";

   cin>>side;

   cout<<"Enter the height: ";

   cin>>height;

   

   double area = side * side;

   double volume = area * height / 3;

   

   cout<<"The area of the base of the pyramid is: "<<area<<endl;

   cout<<"The height of the pyramid is: "<<height<<endl;

   cout<<"The volume of the pyramid is: "<<fixed<<setprecision(2)<<volume<<endl;

   return 0;

}

<u>Pseudocode:</u>

Declare side, height

Get side

Get height

Set area = side * side

Set volume = area * height / 3

Print area

Print height

Print volume

Explanation:

Include <iomanip> to have two decimal places

Declare the side and height

Ask the user to enter side and height

Calculate the base area, multiply side by side

Calculate the volume using the given formula

Print area, height and volume (use <em>fixed</em> and <em>setprecision(2)</em> to have two decimal places)

You might be interested in
8. Ito ay paraan ng pagkuha ng kopya ng isang file mula sa isang website patungo sa file system. * 1 point A. Copyright B. Downl
shutvik [7]

Answer:

I ndd point

Explanation:

points*hahabbabbababbababba avgab abunjing abunjing beh

4 0
2 years ago
How do you change the Background image or picture on Windows desktop?
Mademuasel [1]
Go to settings, personalization, then background. Select the photo file you want to use. Should look like this.

5 0
3 years ago
What will the following code print out: int numbers [] = {99, 87, . 66, 55, 101}; for (int i = 1; i &lt; 4; i++) cout &lt;&lt; n
forsale [732]

Answer:

87 66 55

Explanation:

Array is used o store the multiple values with same data type.

the array show a decimal value .66, i assume this is enter by mistake because option has no decimal value.

The index of the array is start from zero, it means the first element store in the array at position zero.

In the for loop the variable 'i' start from 1 not zero and it goes to i<4 means i=3.

So, it access the element from 2 to 4 because the index is position of element less than 1.

Therefore, 87 66 55 print.

5 0
4 years ago
Which description best applies to a macro?
Mama L [17]

A macro is that pseudo-program that performs a list of actions based on a set of instructions.

<h3>What is macro?</h3>

A macro can be said to be a number of commands that help you to get complex things done via automating simple and via repetitive tasks.

A macro is that pseudo-program that performs a list of actions based on a set of instructions.

Therefore, option A is correct as the macros does a whole lot of work.

Learn more about macro from

brainly.com/question/20050035

#SPJ1

6 0
2 years ago
What information will she need to know in order to obtain assistance from the chief medical officer to reduce the number of deli
Serga [27]

The information that she need to know in order to obtain assistance from the chief medical officer to reduce the number of delinquent records is the Discharge Record Assembly .

What is  an incomplete health record or a delinquent health record?

An  incomplete health record is one that is often open after a set period of time such as more than 30 days and if not complete, the health record is said to be delinquent.

Note that Nurses are mandated to carefully maintain patient records. Therefore, The information that she need to know in order to obtain assistance from the chief medical officer to reduce the number of delinquent records is the Discharge Record Assembly .

Learn more about chief medical officer from

brainly.com/question/18696862

#SPJ1

6 0
1 year ago
Other questions:
  • What does the hard disk drive do? It stores all of the information on a computer. It controls a computer’s operating system. It
    12·2 answers
  • Chdtp aoxophg gr72 ae9&gt;3 zqqz
    12·1 answer
  • The answer for this question?
    14·1 answer
  • What cable should i be using to connect my android tablet to the pc?
    13·2 answers
  • For selection purposes, it is critical that application items have a proven relationship between a selection device and some rel
    5·1 answer
  • Hey does anybody know how to delete history on a school-issued chrome book, I tried to delete it but it won't let you clear your
    7·1 answer
  • A(n) _____ access file is also known as a direct access file.
    13·1 answer
  • An adiabatic capillary tube is used in some refrigeration systems to drop the pressure of the refrigerant from the condenser lev
    15·1 answer
  • What types of printed information are useful to obtain from your target employers?
    5·1 answer
  • What are some of the characteristics found in an editorial photograph?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!