no message
This commit is contained in:
21
Question08-Function/Ex02.php
Normal file
21
Question08-Function/Ex02.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/*
|
||||
* 以下の仕様で関数が作成されています
|
||||
*
|
||||
* 関数名 :average
|
||||
* 引数 :x, y
|
||||
*
|
||||
* 引数で渡された2つの平均値を返す関数
|
||||
*/
|
||||
function average($x, $y)
|
||||
{
|
||||
$result = '平均は:' . (($x + $y) / 2);
|
||||
return $result;
|
||||
}
|
||||
|
||||
$x = 100;
|
||||
$y = 50;
|
||||
|
||||
// TODO: 変数receiveを宣言して、average関数を(変数x, 変数y)で呼び出した結果を代入してください
|
||||
|
||||
// TODO: 変数receiveを出力してください
|
||||
Reference in New Issue
Block a user