-
Sales Generator
How do I write a program that allows you to enter a sales person individual sales orders for one week period(assume the data are intergers). When finished entering sales enter zero, then print out how many orders that sales person had for the week and the total of all his/her orders for the week. Make sure that you prompt the user clearly identify your output.
Sample run
Enter this salesman's individual sales (one at a time):
Enter Sale 100
Enter Sale 150
Enter Sale 200
Enter Sale 450
Enter Sale 500
Enter Sale 0
You took 5 orders this week
The total of your orders is $1400
Use while or do while in this program
-
Re: Sales Generator
Do you have any specific questions about your assignment?
Please post your code and any questions about problems you are having.
-
Re: Sales Generator
What variables should I use and what calculations do i need?
--- Update ---
I don't have a problem with my code its just I haven't written any code and I need help starting.
-
Re: Sales Generator
Do you have a design for how the program will work? As you create that design, you make a list of the variables that the code will need to have to hold what data it needs.
And you'll also list what computations you'll need. When you have the list, then do some research to find the formulas that are needed to do the computation.
The items you ask for will come out as you design the program.
-
Re: Sales Generator
I really dont know how to start the design is in my original post.
-
Sales Generator
How do I write a program that allows you to enter a sales person individual sales orders for one week period(assume the data are intergers). When finished entering sales enter zero, then print out how many orders that sales person had for the week and the total of all his/her orders for the week. Make sure that you prompt the user clearly identify your output.
Sample run
Enter this salesman's individual sales (one at a time):
Enter Sale 100
Enter Sale 150
Enter Sale 200
Enter Sale 450
Enter Sale 500
Enter Sale 0
You took 5 orders this week
The total of your orders is $1400
Use while or do while in this program
-
Re: Sales Generator
Designing a program is an iterative process: do a little, fix it, add some more, fix it, add some more, fix it, etc
Start with a simple list of what the program needs to do. Then take each complex step in the list and break it into a list of simpler steps. Many programs have these three steps:
Get data
process data
write a report
The "get data" step might require asking the user for data, getting all the data needed from the user and saving it for the next step.
The "getting all the data needed" step could require a loop that repeatedly asks the user for the the next item