오늘 학교에서 php수업했는데..
★test22.php
-------------
<?
srand ((double)microtime ()*1000000);
$a = rand(10,99);
$b = rand(10,99);
?>
srand ((double)microtime ()*1000000);
$a = rand(10,99);
$b = rand(10,99);
?>
<form method="post" action="test33.php">
<input type="text" name="a" size="5" value="<?=$a?>"> +
<input type="text" name="b" size="5" value="<?=$b?>"> =
<input type="text" name="c" size="5">
<input type="submit" value="정답확인하기">
</form>
<input type="text" name="a" size="5" value="<?=$a?>"> +
<input type="text" name="b" size="5" value="<?=$b?>"> =
<input type="text" name="c" size="5">
<input type="submit" value="정답확인하기">
</form>
★test33.php
------------
<?
if(($a+$b)==$c)
echo("맞습니다.");
else
echo("틀렸습니다.");
?>
echo("맞습니다.");
else
echo("틀렸습니다.");
?>
이걸했는데............왜~ 이리 어려운지......................
정답을 확인 하는게 골머리를 썩혔습니다... ㅠ.ㅠ
그래서 교수님이 갈쳐주고 답을 아니 허무 하더군요... ㅠ.ㅠ
흑흑 php넘 어려워 ㅠ.ㅠ
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 8개
내공을 더욱 키워야 할듯... ^^
저보다 강력한 내공이 있는분들도 많아요.
몰라도 앞으로만 나가면 어느사이에 실력이 늘겁니다...
궁시렁궁시렁.
ㅋㅋㅋ