no message
This commit is contained in:
18
Question09-MultipleFiles/util/area.php
Normal file
18
Question09-MultipleFiles/util/area.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
// area.php:Ex03用
|
||||
|
||||
/**
|
||||
* 四角形の面積:縦×横
|
||||
*/
|
||||
function calcRectangle($height, $width)
|
||||
{
|
||||
return $height * $width;
|
||||
}
|
||||
|
||||
/**
|
||||
* 三角形の面積:縦×横/2
|
||||
*/
|
||||
function calcTriangle($height, $width)
|
||||
{
|
||||
return ($height * $width) / 2;
|
||||
}
|
||||
Reference in New Issue
Block a user