How would I make a program that asks the user to enter 3 dimensions of a box then it displays:
volume,surface area of each unique face, total surface area
Attempt:
#include <iostream>
using namespace std;
int main()
{
double, L,W,H,volume,total_surface_area,partial_surface_areas
cout << "Give me the dimensions of a box. \n";
cin >> L;
cin >> W;
cin >> H;
volume = L*W*H;
total surface area = (L*W)+(L*W)+(L*H)+(L*H)+(W*H)+(W*H);
cout << "Volume =" << volume << "Total surface area =" << total_surface_area << endl;
return 0;
I havnt even programmed the partial surface areas and what I have is pretty long and messy. How would I make a simple program that asks for the dimensions of a box and then it displays the volume, total surface area, and all the partial surface areas at the same time?