hi everyone, I have just created my first program in visual c++ 2008 and after many frustrating hours to make a calculator to find out how many bricks id need in a wall. Also to find a cost.
Any ways of improving my program will be greatly appreciated. Hope it doesn't turn out ugly.
Here it is:
Code:// How many bricks in a wall calc #include <iostream> using namespace std; int main() { int length, courses, totalbricks, totalprice; cout << "Ayup duck, iv heard you are planning to build a brick wall,"; cout << endl << "and it just so "; cout << "happens that im a quantity surveyor!" << endl << endl; cout << "How long in meter(s) do you want this wall to be then luv??: "; cin >> length; cout << endl; cout << "Yes, yes, ok your wall will be " << length << " metre's long." << endl << endl; cout << "how many course of bricks high do you want your wall to be? "; cin >> courses; cout << endl; cout << "ok your wall will have " << courses << " courses." << endl << endl; totalbricks = 10*(length*courses); totalprice = 6*totalbricks; cout << "you will need about " << totalbricks << " bricks!" << endl << endl; cout << "( I am assuming that you are using my special 10cm long bricks that"; cout << " you can glue together so no gap"; cout <<"or need for mortar! only $6 EACH special offer!)" << endl << endl; cout << "It will only cost you $" << totalprice; cout << ", so your looking at a real bargain!" << endl << endl; cout << "Now be a darlin' will ya and put the kettle on... cheers" << endl << endl; return 0; }



LinkBack URL
About LinkBacks



