Question
I need steps 3-6 above please. I AM REQUESTING SAI NANDAN to help with these exercises please. Code index.php iniitial file :
I need steps 3-6 above please. I AM REQUESTING SAI NANDAN to help with these exercises please.
Code index.php iniitial file :
$customer_type = filter_input(INPUT_POST, 'type'); $invoice_subtotal = filter_input(INPUT_POST, 'subtotal');
if ($customer_type == 'R') { if ($invoice_subtotal = 100 && $invoice_subtotal = 250) { $discount_percent = .25; } } else if ($customer_type == 'C') { if ($invoice_subtotal
$discount_amount = $invoice_subtotal * $discount_percent; $invoice_total = $invoice_subtotal - $discount_amount;
$percent = number_format(($discount_percent * 100)); $discount = number_format($discount_amount, 2); $total = number_format($invoice_total, 2);
include 'invoice_total.php';
?>
Change the code that determines the discount percent 3. Change the if statement so customers of type R with a subtotal that's greater than or equal to $250 but less than $500 get a 25% discount and those with a subtotal of $500 or more get a 30% discount. Next, change the if statement so customers of type C always get a 20% discount. Then, test these changes. 4. Add another type to the if statement so customers of type T get a 40% discount for subtotals of less than $500, and a 50% discount for subtotals of $500 or more. Also, make sure that customer types that aren't R, C, or T get a 10% discount. Then, test these changes. 5. Test the application again, but use lowercase letters for the customer types. Note that these letters aren't evaluated as capital letters. 6. Modify the code so the users can enter either capital or lowercase letters for the customer types. To do that, use logical operators. Then, test this changeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started