Ok, my program right now works I just need it to do some more things.

First- I need for when the user gets to the bool function and enters 'N' it should go back to the checkout function.

Secondly, when the user logs out it should display the totals for total weight of each product that was sold, gross total sales amount, total of actual checkout amounts (discounted), and total discount amount grossed for everytime the checkout was ran. I really have no idea how to do this.

any help is appreciated.

#include <iostream>
#include <string>

using namespace std;

/*
*
*/

int checkout ()
{

float produce = 1, pounds = 0, total = 0, finTotal = 0, finPounds = 0, count = 0;


cout << "Please enter the following: " << endl << "1 for Bananas" << endl;
cout << " 2 for Apples " << endl << "3 for Cucumbers" << endl;
cout << " 4 for Carrots" << endl << "5 for Oranges" << endl;
cout << endl << "0 for Final Total" << endl;

while (produce != 0){
cout << "Enter type of Produce:";
cin >> produce;

if (produce == 1){
cout << "Enter amount in pounds" << endl;
cin >> pounds;
total = pounds * .44;
finTotal += total;
finPounds += pounds;
}

else if (produce == 2){
cout << "Enter amount in pounds"<< endl;
cin >> pounds;
total = pounds * .99;
finTotal += total;
finPounds += pounds;
}

else if (produce == 3){
cout << "Enter amount in pounds"<< endl;
cin >> pounds;
total = pounds * 1.19;
finTotal += total;
finPounds += pounds;
}

else if (produce == 4){
cout << "Enter amount in pounds"<< endl;
cin >> pounds;
total = pounds * .89;
finTotal += total;
finPounds += pounds;
}
else if (produce == 5){
cout << "Enter amount in pounds"<< endl;
cin >> pounds;
total = pounds * .79;
finTotal += total;
finPounds += pounds;
}
else if (produce == 0){

if (finTotal >= 50){
cout << "Your total weight is "<< finPounds << endl;
cout << "Your total is $" << finTotal << endl;
finTotal = finTotal * .5;
cout << "Your discounted total is $"<< finTotal << endl;
count += 1;
}
else{
cout << "Your total weight is "<< finPounds << "lbs."<< endl;
cout << "You total is $" << finTotal << "." << endl;
}

}

else{
cout << "Incorrect input"<< endl;
produce = 1;
}


}

}
bool logout ()

{
bool quit = true;
cout << "Are you ready to quit?" << endl;
cin >> quit;
if (quit == 'N'){
checkout();
}
}



int main(int argc, char** argv) {
checkout();

return 0;
}