Create a function which returns rectangle area with given width and height:
A = L * W where A is the area, L is the length, W is the width, and * means multiply.
Here is my function:
<?php $width = readline(); $height = readline(); $area = calculateArea($width, $height); echo $area; function calculateArea($paramWidth, $paramHeight) { return $paramWidth * $paramHeight; }
622 questions
979 answers
129 comments
53 users