Saturday, 12 December 2015

write a program to calculate the volume(v) of a cube by taking measures fro user (formula: v=length*width*height)

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{ float length,width,height,volume;
cout<<"Enter length"<<endl;
cin>>length;
cout<<"Enter width"<<endl;
cin>>width;
cout<<"Enter height"<<endl;
cin>>height;
volume=length*width*height;
cout<<"volume is = "<<volume;
getch();
}

No comments:

Post a Comment