PHP Code for a Celsius/Fahrenheit convertor

  • Posted:
  • Archived
  • Remote
  • #34084
Andy P.Adam O.Abu Bakar Siddique K.Ashwin B.Erin F. + 3 others have already sent a proposal.
Andy P.
Wordpress / Responsive / HTML5 / Front End Developer
Top Endorsed
United Kingdom Belfast
Adam O.
Web Developer/Consultant
United Kingdom Girvan
Abu Bakar Siddique K.
Expert Statistican, programmer & writer
Top Endorsed
Bangladesh Dhaka
Ashwin B.
Web Developer, Desktop Application Developer, Mobile Phone Software Developer
India Nagpur
Erin F.
Web Development / Design / Email Marketing Consultancy
United Kingdom Milton Keynes
Ben T.
Web Developer
United Kingdom Plymouth
HireIndianProgrammers H.
Expert Programmers at your Service
Top Endorsed
India Chennai
Jesus Rafael C.
Programmer
Venezuela Maracay
  • 1

Description

Use an appropriate looping statement to write a PHP script that displays a list of the Celsius equivalents of zero degrees Fahrenheit through 100 degrees Fahrenheit. To convert Fahrenheit to Celsius, subtract 32 from the Fahrenheit temperature, and then multiply the remainder by 5/9. To convert Celsius to Fahrenheit, multiply the Celsius temperature by (9/5), and then add 32. Use the round () function to display the Celsius temperature to one place after the decimal point. THIS PROJECT MUST BE COMPLETED BY FRIDAY, AUG. 27.

Clarification Board

  • Jesus Rafael C.

    choose my bind and i will give tomorrow pepopleperhour.com does not allow me to put lower the price :S

  • Alex M.

    Ben, It\'s exactly what the client wants.

    I can ammend the code to do whatever the client wishes but it is such an easy job what is the point in charging for it.

  • Ben T.

    Alex, that is not what is required at all. At least read the clients requirements before you attempt to post code to solve the problem - it has made you look ridiculous.

  • Alex M.

    $f=$degree*9/5+32;

    echo(round($f,2));

    That's a piece of it. But can you do the whole script where a visitor enters in a temp in Celsius or Fahrenheit and it gets converted to the other?

  • Jesus Rafael C.

    I can start today, what do you think?

    How much?

  • Stuart P.

    Hi Mike,

    Does this need to be done in PHP? Every time the page loads the request will be sent to the server which will have to process and calculate it - a waste of the server's resources for a set of data which will be exactly the same every time.

    Would it not be better for the freelancer to provide a static table of converted numbers in oC and oF (which is what the PHP code would generate anyway) and save your server's resources?

    Stuart

    No, it has to be done in PHP where a person enters a temp in C or F and it's converted to the other.