Re: Matrix
| From: | Richard Lynch | Date: | Mon, 18 Dec 2000 05:40:55 +0000 |
| Subject: | Re: Matrix | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30831@lists.php.net to get a copy of this message | ||
for ($a = 1; $a <= 3; $a++){
for ($b = 1; $b <= 3; $b++){
for ($c = 1; $c <= 3; $c++){
for ($d = 1; $d <= 3; $d++){
for ($e = 1; $e <= 3; $e++){
echo "$a $b $c $d $e<BR>\n";
}
}
}
}
}
This sounds remarkably like a homework assignment...
A) I hope not, because you shouldn't be asking us to do your homework
B) I hope so, because it's about time PHP was used in the classroom :-)
----- Original Message -----
From: "Keneth" <keneth@cuhk.edu.hk>
Newsgroups: php.general
Sent: Sunday, December 17, 2000 9:05 PM
Subject: [PHP] Matrix
> Anyone know how to write a program of below?
>
> To find all the comination of 1,2,3 as below:
> 1 1 1 1 1
> 1 1 1 1 2
> 1 1 1 1 3
> 1 1 1 2 1
> 1 1 1 3 1
> ...
> ...
>
>
> TOM
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>