#include <iostream.h>
#include <conio.h>
struct vol {
int l_in_feet, b_in_feet, h_in_feet;
int l_in_inch, b_in_inch, h_in_inch;
};
void main()
{
vol room;
char ch[10];
cout << “\n Enter length in feet and inches(XfeetXinch/X F. X I.) :”
cin >> l_in_feet >> ch >> l_in_inch >> ch;
cout << “\n Enter breadth in feet and inches (XfeetXinch..):”
cin >> b_in_feet >> ch >> b_in_inch >> ch;
cout << “\n Enter height in feet and inches(XfeetXinch…) :”
cin >> h_in_feet >> ch >> h_in_inch >> ch;
float len, br, height;
len = l_in_feet + (float)(l_in_inch/12);
br = b_in_feet + (float)(b_in_inch/12);
height = h_in_feet + (float)(h_in_inch/12);
double volm = (double)len * br*height;
cout<< “\n The Length of the Room = “ << len << “feet”;
cout<< “\n The Breadth of the Room = “ << br << “feet”;
cout<< “\n The Volume of the Room = “ << height << “feet”;
cout<< “\n The Volume of the Room = “ << volm << “c.feet”;
getch();
}
No comments:
Post a Comment