//lab8a #include #include #include #include #define in_file \"data.txt\" #define
ID: 3683840 • Letter: #
Question
//lab8a #include #include #include #include #define in_file "data.txt" #define out_file "result.txt" using namespace std; int customer=0, item, dept=0; float purchase=0, discount, netpurchase; const double discount12=0.05; const double discount34=0.08; const double srvchrge1=0.05; const double srvchrge2=0.10; int counter=0; int customerID( int customer); void purchasediscount(); void totaldepartment(); void main () { ifstream ins; ofstream outs; char next_char; ins.open (in_file); outs.open(out_file); ins>>customer; int result=customerID(customer); if (result==1) { cout << " HIGH FASHION DEPARTMENT STORE"<< endl; cout << " MONTHLY BILLING STATEMENT" << endl; cout << " CUSTOMER#"<>dept; ins>>item; ins>>purchase>>customer; purchasediscount(); totaldepartment(); }} ins.close(); outs.close(); getch(); } int customerID( int customer) { if (customer==132) return 1; else return 0; } void purchasediscount () { cout<=10) { discount= (purchase*discount12); cout<<" "<=25) { discount=(purchase*discount34); cout<<" "<
it doesnt seperate the customers
and its doesnt total after every section i need help and im not sure why its not working
Explanation / Answer
COuld you please write the code in a much more formatted way
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.