PHP  Think of one of your Math homework. How can you use program to reveal the answer? Write a calculation program with atleast ten(10) variable statements calculating a problem.. Your program should include:  Variables for each part of problem. See example below: Eg. $apple = 10, $orange = 15, $discount = 0.2 <!DOCTYPE html> <html> <body> <?php $apple = 10; $orange = 15; $discount = 0.2; echo ($apple + $orange) * $discount; ?> </body> </html

Question
PHP 
Think of one of your Math homework. How can you use program to reveal the answer? Write a
calculation program with atleast ten(10) variable statements calculating a problem..
Your program should include:
Variables for each part of problem. See example below:
Eg. $apple = 10, $orange = 15, $discount = 0.2
<!DOCTYPE html>
<html>
<body>
<?php
$apple = 10;
$orange = 15;
$discount = 0.2;
echo ($apple + $orange) * $discount;
?>
</body>
</html

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Programing Language

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: A two-dimensional random walk simulates the behavior of a particle moving in a grid of points. At ea...

A: A java program that takes an integer command-line argument “n” and simulates the motion of a random ...

Q: Form boolean equations in POS and SOP forms from the truth table attached (PLEASE EXPLAIN ALL STEPS)...

A: The Boolean expression from the truth table can be converted into SOP form by:In the final equation ...

Q: Write a program in Java Eclipse that does the following:a) create a 2D Ragged array with columns and...

A: Create a Main class and all required methods to print Ragged array elements. And create all methods ...

Q: Using C++ 11 Write a program which overloads fractions arithmetic operations for division. And inclu...

A: To write a program which overloads fractions arithmetic operation for division add the following mai...

Q: Hi, I just finished the code for writing a java program that accepts ingredients for a recipe in cup...

A: Begin the pseudocode with the description/goal of the program.Indent loop and condition constructs p...

Q: Preffered language is java. Will be compiled with intellij Problem 1 consists of multiple parts. You...

A: Since there are multiple questions and you have not specified which part needs to be answered, we ha...

Q: Suppose that a maximum flow network contains a node, other than the source node, without incoming ar...

A: Maximum flow problem:“Yes”, it is possible if the maximum flow network does not contain source node ...

Q: Problem 2: Using HTML/JavaScript, find and display the number of multiples of a certain number enter...

A: Program:&lt;!--open the html tag--&gt;&lt;html&gt; &lt;!--head tag defines the head portion of a doc...

Q: in python Create a new Python program (you choose the filename) that contains a main function and an...

A: Create a main function in the program.Create an empty list, the name of the list is randomNumber.Use...

Q: Convert the following machine language instructions into assembly language, EXPLAIN ALL STEPS, assum...

A: 82B7DE:The given machine language instruction is 82B7DE.Its equivalent binary representation is 1000...

Q: Create 10 echo statements introducing yourself, your major , your favorite color , your dream vacati...

A: The echo statement is used in PHP to print the data to the output screen.echo statement has no retur...

Q: What challenges did Cisco systems face in order to solve the physical security problems?

A: Click to see the answer

Q: Problem 1 consists of multiple parts. You should finish one part and ensure that it works before mov...

A: Hello. Since your question has multiple sub-parts, we will solve first three sub-parts for you. If y...

Q: What are the four components of php application and explain why these are so important?

A: Four components of a PHP application are the following:DatabaseHTMLSessions/Authentication/ CookiesU...

Q: 1. For the finite automaton below, find a minimal-state finite automaton accepting the same language...

A: Draw the table showing state transitions on different inputs:

Q: How many lines does his algorithm print? Write a recurrence and solve it.function printaton(n: an in...

A: The given program splits into three subprograms with half of the input size each and then prints n^4...

Q: Twin primes are two primes that differ by 2 (e.g., 3 and 5, 101 and 103). Write a ++ program that ou...

A: Program AlgorithmDeclare the required variables and an array of 1000 elements in main().Then use a f...

Q: consider the UDP 12 03 00 0F 00 1E A3 10 what is the total length of UDP

A: Total length of UDP:The given UDP (User Datagram Protocol) header is 12 03 00 0F 00 1E A3 10 

Q: Please explain all stepsSee attachment

A: For, first logic gate OR required Boolean expression is:(X OR Y)  For, second logic gate XOR require...

Q: In C++ how would i write a program that extracts a all of the lines if the payrate is less than what...

A: Program DescriptionDesign a function to split a string into a vector or words / tokensUse the functi...

Q: Can someone help me on solving this? Thank you!

A: For loop:A loop is used repeatedly to execute a sequence of statements until a given condition is fu...

Q: Using the types of entities found in the Colonial Adventure Tours database (trips, guides, clients, ...

A: The Set of entities provided for Colonial Adventure Tours Database includes Trips, Guides, Clients a...

Q: Python 3.7.4 Write a statement that associates s with the empty set.

A: Set:A set is a list of unranked data items, in python data items can be added or removed in a set.Em...

Q: In the table Enrollments (studentID, courseNo, sectionNo, grade, status), which of the followingfunc...

A: Functional dependencyA functional dependency is a relationship between two attributes mainly between...

Q: Python 3.7.4 Open the file hostdata.txt for reading.

A: To open the file hostdata.txt for reading, the statement is: f=open('hostdata.txt','r')The following...

Q: I need some help arranging these countries in a C++ program : China: 1,433,783,686 India: 1,366,417,...

A: Program Instructions:Declare two arrays and store values of countries and populations in each of the...

Q: Translate the following pseudocode for finding the minimum value from a set of inputs.Set a Boolean ...

A: For solving this question first, we must know what pseudocode code is and what exactly question is a...

Q: Suppose that you want to solve a maximum flow problem containing parallel arcs, but the maximum flow...

A: Maximum Flow ProblemMaximum flow problem is a problem that invloves finding a feasible flow through ...

Q: 2. What are the differences between the top-down and bottom-up approaches to information security?Wh...

A: What are the differences between the top-down and bottom-up approaches to information security?Why i...

Q: What are whole disk encryption (WDE) solutions and under what circumstances are they required?

A: DefinitionWhole Disk Encryption (WDE) solutions, basically plays the foremost role in the field of c...

Q: Find the truth table that describes the following circuit.

A: The diagram shown below is taken from the given question- 

Q: Download the attached CreateRandomNumbersFile.cpp file, open it in Dev C++, and then compile and run...

A: The given CreateRandomNumbersFile.cpp asks the user to enter last name and then creates a txt file c...

Q: Construct a truth table for the following: a) xyz + x(yz)' + x'(y+z) + (xyz)'b) (x + y')(x' + z')(y'...

A: Truth table:a. Given Boolean expression:F = xyz + x(yz)’ + x’(y + z) + (xyz)’

Q: Write an application to pre-sell a limited number of cinema tickets. Each buyer can buy as many as 4...

A: Create a java program to pre-sell the cinema ticket.The name of the program is TicketSeller.The maxi...

Q: This program is written in pseudocode."Design a program that asks the user to enter a store's sales ...

A: Program code #1:

Q: I want to see how one can add 80 elements into an array without manually entering in each element.  ...

A: Given,The name of the first array is numberArray1 and the size of the array is 80.The name of the se...

Q: Python 3.7.4 Write the definition of a function twice, that receives an int parameter and returns an...

A: Program code:

Q: What trade-offs are involved in building highly distributed data environments?

A: Trade-offs that are involved in building highly distributed data environments: 1) Availability,  2) ...

Q: Using DeMorgan's Law, write an expression for the complement of F if F(x,y,z) = xz' (xy + xz)+ xy'(w...

A: Demorgan’s law is a transformation rule in Boolean algebra. According to this rule,Negation of A OR ...

Q: 4.7: Time Machine Your time machine is capable of going forward in time up to 24 hours. The machine ...

A: Program Instructions:Take the time in int variables and store extra symbols in the char extra.Pass t...

Q: Translate the following pseudocode for finding the minimum value from a set of inputs into a Java pr...

A: Java program to find the minimum valueimport java.util.Scanner; public class Program{     Public sta...

Q: Then create a new Java application called "Rooter" (without the quotation marks) that does the follo...

A: This JAVA program accepts a positive integer as input and gives the square root up to 4 places of in...

Q: How do I write 1 cup = 8 ounces and then use that to find the total ounces of milk- 2cups +  flour 2...

A: 1 cup is equal to 8 ounces.The total cup is given as 2-cups of milk, 2.66 cups of flour, and 1.5 cup...

Q: Create a class of type student .Members will include: name, gpa, rank (year) Make sure all data is p...

A: The name of the class is Student.All data is a private member of the class.All function is a public ...

Q: What are the components of a function and how do I use it in a program?

A: In programming language there are two types of function one is build in type and the other is user-d...

Q: What is the mantissa and exponent values if 6.75 is represented in 8 bit binary floating point repre...

A: Answer:Conversion of decimal to 8-bit floating point representation:Step1: convert the integer part ...

Q: How do I use printf to round to tenths for this code?    { public static void main(String[] args) { ...

A: Printf() method is used in java to format the string in output stream. This method takes the string ...

Q: Hi, I am required to: Create an array of 100 integers using a random generator. ( 1 for loop) Provi...

A: The given java program will follow the following rubrics:Importing essential header files.Creating a...

Q: Even though the employees in the Cisco systems have doubled, STs remains the same. Why? And how it h...

A: Cisco systemsCisco systems develop, manufactures and sells networking hardware, telecommunications e...

Q: Write an application starting with ProjectTemplate. Name the class AgeCalcApp. The app needs to prom...

A: To write an application name ProjectTemplate with the class name AgeCalcApp. This application prompt...