Home > Backend Development > PHP Tutorial > PHP implements ninety-nine multiplication tables

PHP implements ninety-nine multiplication tables

PHP中文网
Release: 2016-07-25 09:08:04
Original
35864 people have browsed it

php implements the ninety-nine multiplication table


PHP implements ninety-nine multiplication tables


2. [Code][PHP] code

<?php 
for($i=1;$i<=9;$i++)
{for($j=1;$j<=9;$j++)
{if($j<=$i){
echo $j."*".$i." = ".$i*$j." ";}
}
echo "<br/>";
}
 ?>
Copy after login

The above is the content of the PHP implementation of the ninety-nine multiplication table. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template