using namespace std;
#include<iostream>
#include<conio.h>
struct volume
{
int len,width,height,l_inch,w_inch,h_inch;
};
int main()
{
volume v;
cout<<"###First of all enter feet then inches###"<<endl;
cout<<"Enter the length of room in feet and inches : ";
cin>>v.len>>v.l_inch;
cout<<"Enter the width of room in feet and inches : ";
cin>>v.width>>v.w_inch;
cout<<"Enter the Height of room in feet and inches : ";
cin>>v.height>>v.h_inch;
//Now convert these values in float
float length,width,height,volume;
length=v.len+((float)(v.l_inch)/12);
width=v.width+((float)(v.w_inch)/12);
height=v.height+((float)(v.h_inch)/12);
cout<<"The length of room in foot is : "<<length<<endl;
cout<<"The Base of room in feet is: "<<width<<endl;
cout<<"The Height of room in feet is : "<<height<<endl;
volume=length*width*height;
cout<<"Volume of Room is: "<<volume;
}
good
ReplyDeletethanks
oki
ReplyDeletemaam fadia ye code tou net per para ha
ReplyDeletegandu farah hai woh
Delete