Solucio escacs php

De wikiserver
La revisió el 19:30, 5 oct 2014 per Asalinas (Discussió | contribucions) (Es crea la pàgina amb «<source lang="php"> <!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> …».)
(dif) ← Versió més antiga | Versió actual (dif) | Versió més nova → (dif)
Dreceres ràpides: navegació, cerca

<source lang="php"> <!DOCTYPE html>

    <html>   
    <head>   
 <title></title>  
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
 </head>  
 <body>   

Chess Board using Nested For Loop

<?php for($row=1;$row<=9;$row++) { echo ""; for($col=1;$col<=9;$col++) { $total=$row+$col; if($total%2==0) { echo "";
         }  
         else  
         {  
echo "";
         }  
         }  
echo ""; }  ?>
 </body>  
 </html>  

</html> <source>