C++ Program to find volume of Square Pyramid
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
float v , b ,h ;
cout<<"Enter Base Of Square pyramid :";
cin>>b;
cout<<"Enter Height Of Square Pyramid :";
cin>>h;
v=1/3.0*b*b*h;
cout<<"Volume of Square Pyramid with base "<<b<<" ad Height"
<<h<<" is "<<v<<endl;
getch();
return 0;
}
Comments
Post a Comment