Given code: #include using namespace std; int updateLoyaltyCard(int points) { if points ==6{ return 0; }else{ return points++; } } int main() { int customerAPoints = 0; int customerBPoints = 0; int...

Intro to C++ class. I have attached the 1 assignment and the given code that came with it.


Given code: #include using namespace std; int updateLoyaltyCard(int points) { if points ==6{ return 0; }else{ return points++; } } int main() { int customerAPoints = 0; int customerBPoints = 0; int customerCPoints = 0; string customer; float purchase; bool looping while (looping) { cout < "customer:="" ";="" cin="">> customer; if (customer == "nobody") { break; } cout < "purchase:="" ";="" cin="">> purchase; cout < endl;="" if="" customer="="A"{" customerapoints="updateLoyaltyCard(customerAPoints);" }="" else="" if="" customer="=" "b"{="" customerbpoints="updateLoyaltyCard(customerBPoints);" }="" else="" if="" customer="=" "c"{="" customercpoints="updateLoyaltyCard(customerCPoints);" }="" cout="">< "customer="" "="">< customer="">< "="" made="" a="" purchase."="">< endl;="" if="" customer="="A"{" cout="">< "they="" now="" have="" "="">< customerapoints="">< "="" loyalty="" points."="">< endl;="" }="" else="" if="" customer="=" "b"{="" cout="">< "they="" now="" have="" "="">< customerbpoints="">< "="" loyalty="" points."="">< endl;="" }="" else="" if="" customer="=" "c"{="" cout="">< "they="" now="" have="" "="">< customercpoints="">< "="" loyalty="" points."="">< endl; } } return 0; } endl;="" }="" }="" return="" 0;="">
Aug 19, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here