Jump to content

litebearer

Members
  • Content Count

    2,356
  • Joined

  • Last visited

Community Reputation

5 Neutral

About litebearer

  • Rank
    Prolific Member
  • Birthday 01/13/1946

Contact Methods

  • Website URL
    http://nstoia.com

Profile Information

  • Gender
    Not Telling
  • Location
    white lake michigan
  1. Not sure what you mean by How are the functions supposed to work if they are not supplied the necessary information? BTW - I had a small typo above - here is corrected and TESTED version (it DOES work) <?PHP function area($a,$b) { return $a*$b; } function perimeter($a,$b) { echo "Length: " . $a . "<br>"; echo "Width : " . $b . "<br>"; echo "Perimeter: " . (2 * ($a + $b)) . "<br>"; echo "Area : " . area($a,$b); return; } $length = 10; $width = 5; echo perimeter($length,$width); ?>
  2. do you mean... $length=20; $width=10; function area($a,$b) { return $a*$b; } function perimeter($a,$b) { echo "Length: " . $a . "<br>": echo "Width : " . $b . "<br>"; echo "Perimeter: " . (2 * ($a + $b)) . "<br>"; echo "Area : " . area($a,$b); return; } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.