Answered Essay: Program to Return the Average of 3 numbers Enter 1st number. Enter 2ed number. Enter 3rd number Submit Reset

Need some PHP/HTML help here. I keep getting this error: Parse error: syntax error, unexpected ‘?>’​

Your project folder needs to contain 2 files. You’ll have an HTML page with a form that submits 3 numbers to a web server. A PHP page on that web server will add the numbers, divide by 3, then return the average of the numbers to the user. The first file is a regular HTML page with an HTML form. The form needs 3 named text-boxes, a submit button, and a reset button. It should look something like this:

Program to Return the Average of 3 numbers Enter 1st number. Enter 2ed number. Enter 3rd number Submit Reset

The exact format is not that important, but you need these form element at a minimum. Also, we will assume the user actually enters numbers in the boxes and do not at this point need to validate the data. Your second file is a PHP page that will take the 3 numbers, add them together, then send the original 3 numbers and the average of the numbers back to the user along with a little text explaining what is what. The output to your user can be set up any way you want, but there should be a sentence that looks very much like this on the return trip. The average of 4, 5, and 6 is 5. You need to account for the fact that the numbers may be floating point numbers as well as integers. Don’t worry about rounding the number at this point.

Program to Return the Average of 3 numbers Enter 1st number. Enter 2ed number. Enter 3rd number Submit Reset

Expert Answer




<h1>Program to Return the Average of 3 Numbers</h1>
<form action=”average.php” method=”post”>
<input type=”text” name=”first”>&nbsp;&nbsp;<font>Enter 1st number</font><br><br>
<input type=”text” name=”second”>&nbsp;&nbsp;<font>Enter 2nd number</font><br><br>
<input type=”text” name=”third”>&nbsp;&nbsp;<font>Enter 3rd number</font><br><br>
<input type=”submit”>&nbsp;&nbsp;&nbsp;&nbsp;<input type=”reset”>






$first = $_POST[‘first’];
$second = $_POST[‘second’];
$third = $_POST[‘third’];
$average = ($first + $second + $third)/3;
echo “The Average of $first,$second and $third is $average”;





Step1-First of all if you are using windows os download the Xampp server and open it.

Step2:-Start the Apache and Mysql as shown below.

Step3:-Copy the “average.html” and “average.php” into the “C:xampphtdocsaverage”(here create average folder in htdocs folder) and put the “average.html” and “average.php” files in it.

Step4:-Open browser type “http://localhost/average/average.html” in the URL.

Step5:Now the output wil become as follows

Output 2:-


Buy Essay
Calculate your paper price
Pages (550 words)
Approximate price: -

Help Me Write My Essay - Reasons:

Best Online Essay Writing Service

We strive to give our customers the best online essay writing experience. We Make sure essays are submitted on time and all the instructions are followed.

Our Writers are Experienced and Professional

Our essay writing service is founded on professional writers who are on stand by to help you any time.

Free Revision Fo all Essays

Sometimes you may require our writers to add on a point to make your essay as customised as possible, we will give you unlimited times to do this. And we will do it for free.

Timely Essay(s)

We understand the frustrations that comes with late essays and our writers are extra careful to not violate this term. Our support team is always engauging our writers to help you have your essay ahead of time.

Customised Essays &100% Confidential

Our Online writing Service has zero torelance for plagiarised papers. We have plagiarism checking tool that generate plagiarism reports just to make sure you are satisfied.

24/7 Customer Support

Our agents are ready to help you around the clock. Please feel free to reach out and enquire about anything.

Try it now!

Calculate the price of your order

Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.


Let us write that nagging essay.


Submit Your Essay/Homework Instructions

By clicking on the "PLACE ORDER" button, tell us your requires. Be precise for an accurate customised essay. You may also upload any reading materials where applicable.


Pick A & Writer

Our ordering form will provide you with a list of writers and their feedbacks. At step 2, its time select a writer. Our online agents are on stand by to help you just in case.


Editing (OUR PART)

At this stage, our editor will go through your essay and make sure your writer did meet all the instructions.


Receive your Paper

After Editing, your paper will be sent to you via email.

× How can I help you?