could somebody please give me an idea of how i should loop my progam ive looked through the tutorials and when i try to get my program to loop it gives error messages here is my codeits a program to make my work easier but it will be more ecconomic if i can keep it open and ready to accept a new job.Code:// PROGRAM TO WORK MATERIALS OUT FOR A CEILING #include <iostream> using namespace std; int main() { char option; float long_wall; float short_wall; int atile, btile, totaltile; float runnersinglerow, rowsofrunner,totalrunner; float a1200, b1200, total1200; float a600, b600, total600; cout<< "please enter the the length of the longest wall if the\n"; cout<<" sofit is concerete otherwise enter the length of the wall\n"; cout<<"opposite the joists.please note always round up\n"; cin>>long_wall; cin.ignore(); cout<< "now enter the lenght of the other wall.\n"; cin>>short_wall; cin.ignore(); runnersinglerow=long_wall/3600; rowsofrunner=short_wall/1200; totalrunner=runnersinglerow*rowsofrunner; cout<<"you will need... "<<totalrunner<<" runners\n"; a1200=(long_wall/600)+0.5; b1200=(short_wall/1200); total1200=a1200*b1200; cout<<"you will need... "<<total1200<<" 1200 bars\n"; a600=long_wall/1200; b600=short_wall/1200+0.5; total600=a600*b600*2; cout<<"you will need... "<<total600<<" 600 bars\n"; atile=long_wall/600+1; btile=short_wall/600+1; totaltile=atile*btile; cout<<"you will need... "<<totaltile<<" tiles\n"; cout<<"dont forget to round the numbers up as i cant do it yet\n"; cin.get(); cout<<"do you want to try another?\n"; cout<<"y\n"; }
the char option is left over from when i tried to get a yes/no loop. thank you in advance