Advertisement
Jmdnbvs

Cono volumen

Feb 15th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. #include <stdlib.h>
  4. using namespace std;
  5.  
  6.  
  7.  
  8. int main() {
  9.     const double PI  =3.141592653589793238463;
  10.     float radio, altura;
  11.    
  12.     cout<<"Ingrese el radio: ";
  13.     cin>>radio;
  14.     cout<<"Ingrese la altura: ";
  15.     cin>>altura;
  16.    
  17.     float resultado=0;
  18.    
  19.     resultado= (altura*(pow(radio,2))*PI)/3;
  20.     cout<<"Volumen del cono: "<<resultado<<endl;
  21.    
  22.    
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement