question on loops

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ballygowanboy
    New Member
    • Jul 2007
    • 47

    question on loops

    can anyone tell me where to beging with this one?


    Write a program in php which uses a while loop to output a conversion table for 1-100 degrees C to degrees F.



    Where F= (C* 9/5) + 32
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, ballygowanboy.

    Your code should loop through all the values between 1 and 100 and print the result of the CtoF algorithm for each value.

    Comment

    • kovik
      Recognized Expert Top Contributor
      • Jun 2007
      • 1044

      #3
      It'd be better suited as a for loop.

      Comment

      • pbmods
        Recognized Expert Expert
        • Apr 2007
        • 5821

        #4
        Heya, volectricity.

        Originally posted by volectricity
        It'd be better suited as a for loop.
        See this thread.

        Comment

        • kovik
          Recognized Expert Top Contributor
          • Jun 2007
          • 1044

          #5
          People have PHP classes? I'd love to take one. ^_^

          Comment

          Working...