no message

This commit is contained in:
a-kizaki
2026-10-09 12:33:29 +09:00
commit c4365a352f
71 changed files with 12139 additions and 0 deletions

15
Question03-if/Ex03.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
// 前画面で入力された文字列を変数inputに代入してください
$input = 10;
// numに、input(文字列)を数値変換した値を代入します
// ※ 入力された値が、数字ではなかった場合はプログラムがエラーになります
$num = intval($input); // intval(文字列)で数値変換している
// 入力された値が3で割り切れるすうじか判定する条件式を記述してください
if ($num % 3 == 0) {
print "3で割り切れる数字です";
} else {
print "3で割り切れない数字です";
}