Wednesday 27 August 2014

Volume of Pyramid solution in cpp

Leave a Comment
//Volume of Pyramid (1/3) × (base area) × height
#include<iostream>
#include<math.h>
using namespace std;
static double pi=3.1415926535;
int main()
{
double basearea,height,Ans;
cout<<"Enter Base Area = ";
cin>>basearea;
cout<<"Enter Height = ";
cin>>height;
Ans=(1/3)*basearea*height;
cout<<"Volume of Pyramid = "<<Ans<<endl;
system("pause");
}
If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: