Code:
#include <stdio.h>
int main()
#define small_invites 50
#define large_invites 200
{
double cost_small, invites_cost, cost_large;
int num_invites, order_small, order_large;
printf("How much does a small package cost (in dollars)?\n");
scanf("%lf", &cost_small);
printf("How much does a large package cost (in dollars)?\n");
scanf("%lf", &cost_large);
printf("How many invitations are you sending out?\n");
scanf("%d", &num_invites);
//start by getting the price per invite
// smallPricePerInvite = cost_small/small_invites;
// largePricePerInvite = cost_large/large_invites;
//next figure out which per per invite is cheaper
//if the small pack is cheaper than or equal to the large
//pack, find out how many small packs you'll need to get as close as //you can to the number of invites but not over.
//HINT: use a while loop
//if the large pack is cheaper, find out how many large
//packs you'll need to get as close as you can to
//the number of invites but not over.
//HINT: use a while loop
//calculate the remaining invites.
//remainingInvites = num_invites - total;
//total is found in one of the above while loops
//Now you want to figure out if the remaining invites
//would be cheaper to order a small packs or large
//packs.
//Then print!
printf("You should order %d small packages.\n", order_small);
printf("You should order %d large packages.\n", order_large);
printf("Your cost for invitations will be $%.2lf.", (order_small *cost_small) + (order_large * cost_large));
return 0;
}