echo "我的计算器";
?>
我的计算器
$num1 = $_POST['num1'];
$num2 =$_REQUEST['num2'];
$run = $_REQUEST['run'];
switch($run)
{
case '+':print("两数之和为:".($num1+$num2));break;
case '-':print("两数之差为:".($num1-$num2));break;
case '*':print("两数之乘积为:".($num1*$num2));break;
case '/':print("两数之和为:".($num1/$num2));break;
}
?>
本文出自 “ITeamsky-杨波的技术空间” 博客