0019 --- calculate the volume of the table

Source: Internet
Author: User
Calculate the volume of the table
Difficulty level: A; running time limit: 1000 ms; running space limit: KB; code length limit: B
Question description
You can find the volume of the table by knowing the area of the bottom and the height of the table. Given the area and height of the upper and lower sides of the table are S1, S2, and h respectively, write a program to calculate and output the volume of the table.
Input
Three Positive floating point numbers separated by spaces in a row, representing S1, S2, and h, respectively.
Output
A row contains only one positive number, indicating the volume of the table.
Input example
1107 16509 13619
Output example
9.93778e + 007
Other Instructions
You can view the volume calculation formula of the table store. S1 and S2 represent the area of the Upper and Lower sides of the table store, and H represent the height of the table store, s1, S2, and H are floating point data input by the keyboard greater than zero. The program does not need to check whether the input data meets the requirements.

This question uses a new operator, square:

sqrt();

Then I will go online to check the volume formula of the yutai --- I am lazy ----

The Code is as follows:

#include<iostream>#include<cmath>using namespace std;int main(){    double s1,s2,h;    cin>>s1;     cin>>s2;    cin>>h;    cout<

  

  

0019 --- calculate the volume of the table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.