Well, since you need to remember five days worth of data, that suggests using an array (I assume you are using C, not C++).
However, you are asked to track salaries, not daily sales, so your array should represent the number of sales for each salary range.
In main, just loop five times. Each time, ask for the daily sales, convert it to a salary, determine which salary range it falls in, and add 1 to the corresponding element of your array.
Then you can loop again and print out all your data.
Disclaimer: If this really is homework i should tell you that i just started programming so this code might be to messy, not efficient enough to satisfy your teacher.
Ebbo, please don't do other people's homework for them. It teaches them nothing and professors really can spot plagiarism from a mile away. (Though, surprisingly often they just don't care that much in beginning classes...) If I were the teacher I'd fail my student for the semester.
hey duoas!! stop assuming things. i m a biotechnology student n i'm just interested in programming. like ebbo.. anyway i got no teacher , coz i m learning myself..using internet and books!!!! by the way, whats giving you pain in the ass.? r u working out there??? thank god u are not a lecturer.. i dont think you can be one.... hahahaha..
ps. if i were your student, you would have been murdered by me long ago.
I don't think that your language here is acceptable.
Duoas has a very valid point. He did not forbit ebbo to post "homeworks" but merely stated the obvious: If you do not do it yourself you do not learn a thing.
And I am certainly with duoas that I would let everybody who copy and pastes his papers have an F for said paper. That's, by the way, stated in every exemination-regulations of every university I know.
So don't be upset about such statements because thez are valid and necessary and most importantly
YOU SHOULD NOT THREATEN ANYBODY!
@exypnos.
Nobody cares if your a student studying programming or not. You had an "assignment" question to do (be it personal or professional) and you made no attempt yourself to complete it. That's just lazy, and unfortunately every day multiple people just like you post up requirements expecting someone else to do the work for them.
Duoas was merely pointing out that by doing the work for you Ebbo was setting a bad example, as more and more people will expect work to be done for them. I don't think Duoas would be a bad lecturer, I think you'd just fail.
And personal insults, especially on the life of someone are illegal in most countries. So best watch what you say/type.
By the very nature of an open forum, you will get advice that you may not have asked for. You may choose to ignore it, but it is worth remembering that the advice is coming from the people that you have asked for help. They are giving their time (freely) to help you and others. It may seem like they are not helping, but the intention is there.
I do hope that you have learnt from the code that ebbo posted for you, but it is still true that you will learn ‘better’ if you do the work yourself.