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

Popular posts from this blog

Binary Search, Linear Search, Selection Sort and Bubble sort Python Menu Program

Housie/Tambola using Python with Tickets in PDF file

100% Working C++ Tambola/Housie Code with 90 Unique Numbers