So when I build and run this program IN CodeBlocks it runs through the whole thing fine..
When I build a Release and load it from the executable it stops and closes the program out immediately after selecting 1 or 2 for incomechoice.. Any help is much appreciated...Thank you
Code:while ( t < 1 ) { { cout<<"\n\nIs there any bills/expenses we missed?\n"; cout<<"Please make sure we haven't left anything out.\n"; cout<<"\nEnter the corresponding number below\n"; cout<<"\nYes(1) No(2): "; cin>> missedchoice; cin.get(); } if ( missedchoice == 1 ) { cout<<"\nPlease input your missed expense on a MONTHLY calculation: "; cin>> missedinput; cin.get(); t = t + 1; } else if ( missedchoice == 2 ) { t = t + 1; } else if ( missedchoice > 2 ) { cout<<"\n\n\n\n Invalid entry. Please enter 1 or 2.\n\n"; t==0; } } //End missed expense check //Begin calculations Hourly if ( missedchoice == 1 ) { cout<<"\n\nCalculating...\n"; cout<<"Calculating.....\n"; cout<<"Calculating.......\n"; cout<<"Calculating........\n"; cout<<"\n\n\nYour net pay for the year should be around: $"<< paycheck * 52 <<"\n\n\n"; cout<<" AFTER EXPENSES YOU WILL HAVE:"; cout<<"\n\n$"<< ( paycheck * 52 / 12 ) - ( annual / 12 ) - ( gas * 52 / 12 ) - ( food * 52 / 12 ) - ( expenses ) - ( missedinput )<<"/MONTH\n"; cout<<"\n\n$"<< ( paycheck ) - ( annual / 52 ) - ( gas ) - ( food ) - ( expenses * 12 / 52) - ( missedinput * 12 / 52)<<"/WEEK"; cout<<"\n\n\n$"<< ( paycheck * 52 / 365 ) - ( annual / 365 ) - ( gas * 52 / 365 ) - ( food * 52 / 365 ) - ( expenses * 12 / 365 ) - ( missedinput * 12 / 365 )<<"/DAY"; u = u + 1; } else if ( missedchoice == 2 ) { cout<<"\n\nCalculating...\n"; cout<<"Calculating.....\n"; cout<<"Calculating.......\n"; cout<<"Calculating........\n"; cout<<"\n\n\n\nYour net pay for the year should be around: $"<< paycheck * 52 <<"\n\n\n"; cout<<" YOUR MONEY AFTER EXPENSES WILL BE:"; cout<<"\n\n$"<< ( paycheck * 52 / 12 ) - ( annual / 12 ) - ( gas * 52 / 12 ) - ( food * 52 / 12 ) - ( expenses )<<"/MONTH\n"; cout<<"\n\n$"<< ( paycheck ) - ( annual / 52 ) - ( gas ) - ( food ) - ( expenses * 12 / 52)<<"/WEEK"; cout<<"\n\n\n$"<< ( paycheck * 52 / 365 ) - ( annual / 365 ) - ( gas * 52 / 365 ) - ( food * 52 / 365 ) - ( expenses * 12 / 365 )<<"/DAY"; u = u + 1; } //End Hourly Calc if ( ( ( paycheck * 52 / 365 ) - ( annual / 365 ) - ( gas * 52 / 365 ) - ( food * 52 / 365 ) - ( expenses * 12 / 365 ) ) < 0 ) { cout<<"\nHmmm, either we messed up somehwere or you have some debt.\n\n"; } //END { cout<<"\n\n Thank you for using Liquid Money!\n\n\n\n"; } }



LinkBack URL
About LinkBacks



