i have problem on my C language Program >this is the given problem<...

Question Answered step-by-step i have problem on my C language Program >this is the given problem<... i have problem on my C language Program  >this is the given problem<1. Any call activated after 6:00pm (1800hours) yet before 8:00am (0800 hours) is discounted by50%.2. Any call activated after 8:00am (0800 hours) yet before 6:00pm (1800hours) is charged with a fullprice.3. All calls are subject to 4% tax.4. The regular rate for a call is P0.40 per minute.5. Any call longer than 60minutes receives a 15 % discount; that is, after any other discount is givenand before tax is taken upon >and this is the output needed< This is the correct output of net cost totalStart Time : 0123End Time : 0224Length of call : 61 minutesThe caller is entitled for a 15% discount.Gross cost :P 24.40Tax :P 0.98Net Cost :P 23.42 but my program the Net cost total is 9.40 instead 23.42 and theres many 0 showing on minutes and discounts     #includeint main(){int start;int end;char command;float time, discount, length, rate;float gross, grossResult, result, tax, net;print:printf(“PLDT Telephone Call Chargen”);printf(“Start Time    : “);scanf(“%d”,&start);printf(“End Time      : “);scanf(“%d”,&end);if ((start < 0000) || (end >2400)){printf(“invalid Input…. “);}else {time = end – start;length = time * .60;if(length-(int)length>0.5)result = (int)length+1;elseresult = (int)length;printf(“Length of call : %f minutes”,result);if (result > 50)discount = 15;else if (start >= 801 && end <= 1200 && length >= 60) discount = 15;else if (start >= 1201 && end <= 1799 && length >= 60) discount = 15;else if (start >= 1800 && end <= 2400)discount = 50;else if (start >= 0001 && end <= 800)discount = 50;else if (start >= 801 && end <= 1200) discount = 0;else if (start >= 1201 && end <= 1799) discount = 0;printf("nThe caller is entitled for a %f %% discount",discount);gross = 0.40 * result;grossResult = gross;printf("nGross Cost :P %f" , grossResult);tax = gross * .04;net = grossResult - discount;printf("nTax        :P %.2f", tax);printf("nNet Cost   :P %.2f", net);}again:printf("nEnter another [Y/N]: ");command = getchar();if(command == 10){   command = getchar();}{if(command == 'y' || command == 'Y')goto print;else if(command == 'n' || command == 'N')return 0;}} Computer Science Engineering & Technology C++ Programming IT 1111 Share QuestionEmailCopy link Comments (0)