0
how to code in php. using loop the output will be like this. ***** ***** ***** ***** ***** and *+*+* +*+*+ *+*+* +*+*+ *+*+* 😭😭😭
3 Respuestas
+ 4
<?php
for($i=1;$i<=5;$i++){
for($j=1;$j<=5;$j++){
echo '*';
}
echo '<br>';
}
echo '<br>';
for($i=1;$i<=5;$i++){
for($j=1;$j<=5;$j++){
if($j%2==0){
if($i%2==0){
echo '*';
}else{
echo '+';
}
}else{
if($i%2==0){
echo '+';
}else{
echo '*';
}
}
}
echo '<br>';
}
?>
0
two nesteds loops
one for lines and the other for caractère
0
thank you very much. ☺☺☺