Help Please

Help me please i need to write a program and have no idea how to get this started if anyone has any ideas or can help me in anyway i would really appreciate it.
I have posted the assignment under this so please and thank you


Write a fruit store shopping cart program. First, ask user’s information (name,
address, phone number).
Then, display the menu:
1. Orange $1.00 each
2. Banana $2.00 each
3. Tomato $3.00 each
4. Grape $2.50 each
5. Pear $10.00 each
6. Lemon $0.50 each
7. Finish shopping
Let the user shop as many times as he/she wants until he/she enters number ‘7’
to exit. Then, the program calculates the total price before tax.
At the end, print a receipt on display and save to a file include user’s information,
purchase items, total price before tax, discount, tax, and total price with tax (just
like those receipt from HEB).
If you have homework it would really benefit you to read the accompanying text. Generally speaking teachers don't give assignments without having imparted the required information (Unless they are miserable people who enjoy initiating failure). This will employ working with floating point variables, getting user data, using file streams, and looping. If you have covered this material in class then you should be able to at least make an initial go at it. Go ahead and then post the code here and we can help you out if you get confused.
thanks i will go ahead and try that and btw my teacher does enjoy seeing us fail
I believe you can also use a switch statement to create the menu. Whenever I'm starting off with an assignment and I'm not sure where to start, I write down what needs to happen on a piece of paper and ideas on how to make it happen using the code I know. Then whatever I don't know, I look it up in the textbook. If you don't know much about switch statements, then definitely read up on that. You'll have to essentially create a function that adds up what the user chooses to buy each time they choose that specific case. Then an 'exit/calculate balance' function when they choose menu option #7. As far as saving the information to a file, you'll have to look into incorporating fstream into your code. There is a lot to learn about both of these topics. Hope that helps !
I think your taking the same instructor as I am. I have that exact same assignment
so far this is what i have i havent been able to compile it to see if im going in the right direction or not any tips on what i can do?

#include <iostream>
using namespace std;
int main()
{
cnst double x > 0, x = 0,
fr1 = 1.0,
fr2 = 2.0,
fr3 = 3.0,
fr4 = 2.5,
fr5 = 10.0,
fr6 = .50,
exit7 = exit;

double name, address, phone, price, tax,product1, product2, product3, product4, product5, product6;
cout << “Enter name “ << endl;
cin >> name;
cout << “Enter address “ << endl;
cin >> address;
cout << “ Enter phone number” “ << endl;
cin >> phone;
cout << “your phone number here “ << endl;
cout << “1. Orange $1.00 each << (fr1 * x) endl;
cin >> product1;
cout << 2. Banana $2.00 each << (fr2 * x)endl;
cin >> product2;
cout << 3. Tomato $3.00 each << (fr3 * x) endl;
cin >> product3;
cout << 4. Grape $2.50 each << (fr4 * x) endl;
cin >> product4;
cout << 5. Pear $10.00 each << (fr5 * x) endl;
cin >> product5;
cout << 6. Lemon $0.50 each << (fr6 * x) endl;
cin >> product6;
cout << “7. Finish shopping “ << (exit7) endl;
cout << “Price =” << (product1 + product2 + product3 + product4 + product5 + product6)
cin >> price;
cout << “Discount “ << (0) << end;
cout << “Tax “ << (8.25/100 * price) << endl;
cin >> tax;
cout << “Total = “ << (price + tax) endl;
return 0;
}
Topic archived. No new replies allowed.