hey all.
this is (if i remember correctly) my first post, i have done alot of reading on this forum though and have found the info invaluable.
my program is a calculater that calculates the amount of sheets of plasterboard and bags of plaster needed for a wall, firstly: have i gone the long way around for this particular code, i mean is there a shorter way of writing it, and can anyone point me in the right direction for creating some kind of loop that will calculate wall after wall and add the total when all of the measurements have been input. thank you in advance for any advice given. Ryan
#include<iostream>
using namespace std;
int main()
{
double b = 2.88;
double h = 2.4;
double w;
int p = 25;
cout<< "Enter the width of the wall.\n ";
cin >> w;
cout<< "\n";
cout<< "The amount of boards needed are\n ";
cout<< h*w/b;
cout<< "\n\n";
cout<< "The amount of bags of plaster needed are\n ";
cout<< h*w/p;
cout<< "\n\n";
system("PAUSE");
return 0;
}