The lab 3 assignment that I have is still having a problem on the computation. If anyone can help me again please on what I am missing or what is wrong why it won't compute:
Here is what i have to do: And my code is below but don't work:
First the code to do:
computeCharges ( ... ):
Should have no output to the screen and compute all rental / customer charges based on the following rules:
1. New Release is charged at $2.99 per day
2. Recent Release is charged at $3.99 for every period of 3 days or less
3. Classic Release is charged at $2.99 for every period of 5 days or less
4. Budget Release is charged at $1.00 for every period of 5 days or less
Example: A recent release rented for 10 days (or 3 1/3 rental periods) would be charged at 4 x 3.99 (partial period is charged at the same rate as a full period).
5. Customers with a coupon receive a $1.00 off on the total rental charge for a Recent or Classic rental. Coupon may be applied only to one video per customer and can not be applied to a lost video.
6. An entry of zero in days rented will signify a lost video and the customer will be charged a $75.00 replacement fee.
7. Any video returned after 90 days will be considered late (but not lost) and be charged at the lesser of the calculated fee (based on days rented) OR the replacement fee of $75.00.
8. Sales Tax is to be computed at 8.6% on the total of all video rental charges.

My code that won't work:
//header
void computecharges(double price, int DaysRented, char Category,char Y)
{

if (Category == 'N')
price = DaysRented * 2.99;
else if (Category =='R')
{
price = DaysRented * 3.99;
if (Y == 'Y')
price = price - 1;
}
else if (Category == 'C')
{
price = DaysRented * 2.99;
if (Y == 'Y')
price = price - 1;
}
else if (Category == 'B')
price = DaysRented * 1.00;

else if (DaysRented == 0)
price = 75;

else if (DaysRented == 90)

price = 75;
price = price + price * 0.086;
}

THEn THIS DISPLAY RECEIPT
Store Name: Honest Abe's Bootleg Videos

Customer Name:
Address:
City/State/Zip:

Coupon Presented (Y/N):

Days Coupon
No. Video Title Category Rented Applied Late/Lost Charge
=== ============================== ========
1.
2.
3.


//header
void displayreceipt(char Fullname[MAX_NAME + 1],char Address[MAX_NAME + 1],char City[MAX_NAME + 1],char Y, char VideoTitle[MAX_NAME + 1],char Category,int DaysRented,char CouponApplied[MAX_NAME + 1], char Late[MAX_NAME + 1], float Charge)
{
int i;
system("cls");

printf("Store Name: %s\n\n", TITLE);
printf("Customer Name: %s", Fullname);
printf(" Address: %s", Address);
printf(" City/State/Zip: %s", City);
printf("Coupon Presented (Y/N): %c", Y);

printf(" Days Coupon \n");
printf("No. Video Title Category Rented Applied Late/Lost Charge\n");
printf("=== =================== ======== ====== ======= ========= ======\n");
for (i = 0; i < MAX_VIDEO; i++)
{
printf("%i. %s %s %d %s %s %f\n", i + 1, VideoTitle, Category, DaysRented, Y, Late, Charge);
}
}

When I try to display the receipt got an illegal operation:

From the bottom of my heart to those who will help thanksagain