Question

create a loop program for calculating discounts for teachers tgat include 5%, 10% , 15%, 20%...

create a loop program for calculating discounts for teachers tgat include 5%, 10% , 15%, 20% and 25% using PHP coding
0 0
Add a comment Improve this question Transcribed image text
Answer #1

<?php
$amount=1000;
$temp=0;
for ($x = 5; $x <= 25; $x+=5) {
$y=$amount * ($x/100.0);
echo "$x $y\n";
}
?>

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me

Add a comment
Know the answer?
Add Answer to:
create a loop program for calculating discounts for teachers tgat include 5%, 10% , 15%, 20%...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program to create an array with 5 integer values: 10, 20, 30, 40, 50....

    Write a program to create an array with 5 integer values: 10, 20, 30, 40, 50. And then print the array data to monitor. Using NetBeans

  • USING MATLAB. Design a program which uses a for…end loop to add 10 to a variable...

    USING MATLAB. Design a program which uses a for…end loop to add 10 to a variable V five times. Use a counter variable to count the number of iterations that pass and display this count after the program exits the loop. To design your program, create a flow chart and iteration table (choose he starting variable V = 20). Once it is designed, code it and step through the loop to confirm your iteration table.

  • Create a program named Lab14B. You will create a nested loop in this program by putting...

    Create a program named Lab14B. You will create a nested loop in this program by putting Lab14A’s for loop inside a while loop. In the new while loop, you will read integers from the file, Lab14B.txt, and determine if the number is prime (using the copied loop from Lab14A). Stop the while loop when you reach the end of file. Copy your code from Lab14A into your new program Add a while not eof loop around that code, and also...

  • Using C++ 1. Create a while loop that counts even numbers from 2 to 10 2....

    Using C++ 1. Create a while loop that counts even numbers from 2 to 10 2. Create a for loop that counts by five (i.e. 0, 5, 10, ...) from 0 to 100 3. Ask for a person's age and give them three tries to give you a correct age (between 0 and 100) 4. Use a for loop to list Celsius and Fahrenheit temperatures. The "C" should be from -20 to 20 and the F should be shown correspondingly...

  • 5.4 Java Create a program that generates SuperLotto lottery numbers. Create a class called SuperLottoPlus.java Create...

    5.4 Java Create a program that generates SuperLotto lottery numbers. Create a class called SuperLottoPlus.java Create a method called generateSuperLottoNumbers() that returns an array of 6 random SuperLotto lottery numbers. The first 5 numbers must be from the range 1 to 47 The 6th number (the MEGA) must be from 1 to 27. Create a method called printTicket() that takes an integer array as an parameter it will loop through the integer array and print out the data Display the...

  • JAVASCRIPT Create a program that uses a loop, conditional statements, and a function to complete the...

    JAVASCRIPT Create a program that uses a loop, conditional statements, and a function to complete the following: Using a loop, ask the user to enter the item name, price, and quantity for 3 items. Using a function, calculate the following: Calculate the cost of each item and display the cost on the screen. Calculate the total cost of the three items and display the total cost on the screen. Add a shipping charge at the end of the order based...

  • 25 20 15 10 5 X 0 5 10 15 20 25 An equation that represents...

    25 20 15 10 5 X 0 5 10 15 20 25 An equation that represents the function could be 1) g(1) = 26 +15° - 25 2) g(x) = -3(x + 1.5) – 25 963) = (x = 15)* +25 4) 4(x) = 363-15)* - 25 3)

  • In Java: Create an array of Integers with 10 elements, loop (use a for loop) through...

    In Java: Create an array of Integers with 10 elements, loop (use a for loop) through the array of integers printing their values to the screen. Create an array of Strings with 10 elements, loop (use a for loop) through the array of Strings printing their values to the screen. Finally, create an ArrayList of Integers. Use the loop from part 1 above and add each integer as you print it to the ArrayList as well, then start a final...

  • Write a program using the PHP application that will create a form for your favorite store....

    Write a program using the PHP application that will create a form for your favorite store. The form should include fields for contact information and at least three(3) items to order from. It should calculate the order and display a subtotal before tax and a total after tax. Also add background color and pictures

  • Write a PHP program using a ''FOR loop' to compute and print the employee's salary for...

    Write a PHP program using a ''FOR loop' to compute and print the employee's salary for some number of years with a percent increase each year. Your submit button should re-call this page and use PHP to create a table of salaries for each year starting at 1 up to the value of the years variable. So if 'years' is equal to 5, there should be 5 rows in your table. For each year, the salary increases by X%. Make...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT