<?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
create a loop program for calculating discounts for teachers tgat include 5%, 10% , 15%, 20%...
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 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.
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 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...
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)
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 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...
Assignment (Must be completed and submitted prior to your lab3 session) Create a do-while loop that displays a random number on the screen, and then displays a message (in a new line) asking the user if he wishes to see another random number. If the user responds with a 'y' or a ‘Y' character, then the program shall repeat (i.e. outputs another random number and asks the user again). If the user responds with HINTS: To generate a random number...
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...
Create a new Python program in IDLE, and save it as lab8.py.(Again, I recommend saving lab progranms Your Python program will do the following: Create an empty list . Use a for loop to ask the user for 10 numbers. Add each number to your list using the append metha . Use another for loop to print the list in reverse order, one per line . Use a while loop to count how many positive numbers are in the list...