// C++ Weight Finder
// Values. a = height b = width c = depth/thickness d = material
 
#include <iostream> 
                   
using namespace std;
 
int main() {
    string m; 
    cout << "Enter Measuring Unit (mm or metres):\n"; 
    cin >> m;

    double a;
    cout << "Enter Height:\n"; 
    cin >> a;
	
    double b; 
    cout<< "Enter Width:\n"; 
    cin >> b;
	
    double area; 
    area = a*b; 
    cout << "Area Of Shape = " << area; 
    if (m == "mm") { 
        cout << " mm2" <<endl; 
    }
    else {
        cout << " m2" <<endl; 
    }
	
    double c; 
    cout << "\nEnter Depth/Thickness:\n"; 
    cin >> c;
	
    double vol; 
    vol = area*c;
    cout << "Volume Of Solid = " << vol;
    if (m == "mm") {
        cout <<" mm3" <<endl; 
    }
    else {
        cout << " m3" <<endl; 
    }
	
    double w;
    string dens;
    cout << "\nEnter Material Used:\n";
    cin >> dens;
	
	double s;
	double g;
	if (m=="mm"){
		s = 7.85;
		g = 0.05;
	}
	else {
		s = 7850;
		g = 50;
	}
	
    if (dens == "steel") {
        w = vol*s;
    } 
    if (dens == "grp") {
        w = vol*g;
    }
    cout << "The Weight Of The Solid = " << w << "Kg" << endl;
    return 0; 
}