Answers to quiz questions
1.$numtoloop = 5;
$num = 0;
while($numtoloop > 0){
$num = $num + $numtoloop;
$numtoloop--;
}echo $num;
?>
2.
function programmer compliment(){
echo "You are a logical programmer!";
}
3.
function milespergallon($miles, $gallon){
$mpg = $miles / $gallon;
return $mpg;
}
0 Comments:
Post a Comment
<< Home