Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with these php files for my Computer Programming class. Your help would be greatly appreciated! Thank You! Please write and complete the

I need help with these php files for my Computer Programming class. Your help would be greatly appreciated!

Thank You!

Please write and complete the following programs in PHP. You will run the files on your local server by uploading them in the htdocs folder of your Xamp server and running them using localhost on your browser.

Programs to write:

1) Fahrenheit to Celsius conversion: You will need to write a program that uses variables to store 4 values of temperatures in Fahrenheit and then converts them to degrees Celsius. The formula for conversion is C=(F - 32) * 5/9. The four values of temperature are a) 32 F, b) 100 F, c) 0 F, d) -40 F. The output should print or echo the following statements identifying the writer of the program and the conversion for each temperature value. Example: "This program was created by $Yourname. The temperature 32 degrees Fahrenheit is equivalent to 0 degrees Celsius". Use variables to store your name, the temperature values in Fahrenheit and temperature values in Celsius. Save the php file with yourlastnameFtoC.php and also add your name in the comments section of the program. You will execute it in the browser and take a screenshot of the output. You can submit each screen shot individually or you can paste them all in one word document and label them appropriately.

2)Circle Area, Circumference and ratio: For a circle with a given radius, write a program to compute 1) area of the circle, 2) circumference of the circle and 3) the ratio of the circumference to its diameter. You will use 3 different values of radius a) 10cm, b) 50 cm, and c) 100cm for your computations. The output should print or echo the following statements identifying the writer of the program and the computation for each value of the radius. Example: "This program was created by $Yourname. The area of the circle with radius 10cm is 314 square centimeters. Its circumference is 6.28cm and the ratio of its circumference to its diameter is 3.14" . You will use variables to store the values of for each radius and for your computations along with your name. Save the php file with yourlastnameCircle.php and also add your name in the comments section of the program. Following are the formulas needed for computation:

a) area of circle with radius r is = r2 Greek letter represents a constant, approximately equal to3.14

b) circumference of the circle = 2 r

c) Ratio of circumference to the diameter = 2 r/D where the diameter of a circle D=2r.

You will execute it in the browser and take a screenshot of the output. As with the previous program, you can submit each screen shot individually or you can paste them all in one word document and label them appropriately.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions