Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help within 30 minutes. I'll upvote if correct no additional information was given. please write out the code. First, Write a piece of php
please help within 30 minutes. I'll upvote if correct
no additional information was given. please write out the code.
First, Write a piece of php code to implement the following design: 20 points 1. Declare a variable named discount_amount without assigning any value: 2. Declare another variable with a name order total, and assign any integer number value to it 3. Compose a control statement to do different calculations and assign the calculated result to the variable named discount amount under different condition: 3.1. When the value of a variable named order_total is larger or equal to 300 and at the same time smaller or equal to 400 , times the order total with number 0.1, and assign this calculated result to the variable named discount amount. 3.2. When the value of a variable named order total is snaller than 300, times the order totai with number 10 , and assign this calculated result to the variable named discount_amount. 3.3. When the value of a variable named order total is larger than 800 times the order total with number 0.01, and assign this calculated result to the variable named discount_amount. 3.4. If none of the above conditions are satisfied update the value of the variable named discount amount by increasing number 1. Then, Under your written block of code, use a new line/space to write the value eventually stored in the vaniable named discount,amount, according to the value you've assigned to the variable named order total in the step 2 . above. For example, you could write: Given I've assigned value xxx to the variable yyy, the eventual value saved in variable sdiscount amount after executing the control statement will be zzz. Tips: You could test run your code in your corputer to confilinm the corfectness of your code syptax and yourStep 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