You are using a version without Ads of this website. Please, consider donating:

### Code Clean-up

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100`` ``````#include #include #include using namespace std; int main() { int monthlymins = 0, overA = 0, overB = 0, month = 0, minA, minB; double planA, planB, costA = 0, costB = 0, totaloverA = 0, totaloverB, yearlyA = 0, yearlyB = 0; //banner cout << "Welcome to WireMore. Here you will be able to compare two plans, enjoy!" <> planA; cout << "Enter the number of minutes allowed monthly for Plan A: "; cin >> minA; }while(planA <= 0 || minA <= 0 ); do { cout << "Please enter your monthly price for Plan B: \$"; cin >> planB; cout << "Enter the number of minutes allowed monthly for Plan B: "; cin >> minA; }while(planB <= 0 || minB <= 0); cout << "\nPlease enter the number of minutes you used each month for the past 12 months:\n"; //loop for monthly minutes input for (month = 1; month <=12; ++month ) { do { cout << "Month " << month << ": "; cin >> monthlymins; }while (monthlymins <= 0); //calcs the over charges if mintues used it greater than minutes allowed if (monthlymins > minA) { overA += (monthlymins - minA); } if (monthlymins > minB) { overB += (monthlymins - minB); } } //calc for plan A costA = planA * 12; totaloverA = overA * .35; //calc for plan B costB = planB * 12; totaloverB = overB * .35; //yearly total for A and B yearlyA = costA + totaloverA; yearlyB = costB + totaloverB; cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); //determines which plan it better and how much the user will save if(costA < costB) { cout << "\nThe plan best suited for you is Plan A,"<
What do you want us to do? You need to be more specific.
oops, sorry to include that part. But I was asking if this is a correct format/indenting. And if not is there a specific way I should be formatting
It's quite inconsistent...if you make it consistent, it's generally fine. There are many styles, just pick one you like and stick with it.
what makes it inconsistent? im fairly new to coding so my question are generally silly lol
I would suggest having your braces line up a big nicer ` { and }'s `. The ones, especially near the bottom are mis-aligned a bit.
Okay, i see what your saying. Thanks!! :)
Topic archived. No new replies allowed.

You are using a version without Ads of this website. Please, consider donating: