f



How to set up "Do" or "While" loops for several seperate commands

Hello math friends,

I have written a program to calculate the (k-m)-rank of a partition. It
involves repeating 7+ lines of code 77 times. I understand how to set
up "Do" and "While" loop commands for a single, complex command, but
don't understand how to do it for 7+ seperate lines of code.

Can someone explain? I would be happy to foward the program, if you
would like it.

Thanks,

Diana Mecum

0
diana.mecum (161)
5/9/2006 6:58:20 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

1 Replies
375 Views

Similar Articles

[PageSpeed] 50

Hi Diana,

write all your commands in a single cell,
but separate them by a semicolon ';'

x = 1;

Do[
x += 1;
 Print[x],
{i, 10}]

Bye Ben


Diana Mecum schrieb:

> Hello math friends,
>
> I have written a program to calculate the (k-m)-rank of a partition. It
> involves repeating 7+ lines of code 77 times. I understand how to set
> up "Do" and "While" loop commands for a single, complex command, but
> don't understand how to do it for 7+ seperate lines of code.
>
> Can someone explain? I would be happy to foward the program, if you
> would like it.
> 
> Thanks,
> 
> Diana Mecum

0
5/9/2006 7:50:22 AM
Reply: