Basically I need to find the minimum number of packages I need which is the cheapest price.
I did a*price_small+b*price_large= total cost
and 200*a+ 50*b = total_invitations
but since I have to use if statements as well as while loops I don't know how to find the minimum of each. Hope one of you can help.
Arup wants to just send a free E-vitation to all of his guests for his wedding, his fiancee will have none of it. She has put her foot down and has insisted that they mail out regular invitations. After doing some research, Arup found out that depending on the size of the packages of invitations ordered, there are different prices. He wants you to figure out how many of each package to order, in order to get enough invitations to mail out at the cheapest price. For the purposes of this problem, there are only two packages:
1) One with 50 invitations
2) One with 200 invitations
Each vendor has a different price for the two packages. You’ll ask the user to input these two prices, as well as the total number of invitations that need to be sent out. Your job will be to calculate how many of each package to buy for the best deal, and how much will be spent on invitations.