Here is part of my code:
Code:
char selection;
double item_cost;
double amount;
double owed;
double total;
printf("\nPlease deposit your money by selection:\n1: %.2f\n2: %.2f\n3: %.2f\n4: %.2f\n5: %.2f\n",5.00,1.00,0.25,0.10,0.05);
printf("Deposit amount:%d");
scanf("%lg", &amount);
printf("Price of Item %c is %lg", &selection, &item_cost);
printf("Balanced entered:%lg", &amount);
Here is the output I am trying to replicate:
Code:
Please deposit your money by selection:
1-$5.00
2-$1.00
3-$0.25
4-$0.10
5-$0.05
Deposit Amount: 1
------------------------------
Price of Item: k is $1.00
Balance Entered: $5.00
--------------------------------------------------------------------------
I'm confused on how i get the 1/2/3/4/5 to equal the right price since the deposited amount is being represented by the selection and not the price.