Re: How to set up "Do" or "While" loops for several seperate commands
- To: mathgroup at smc.vnet.net
- Subject: [mg66325] Re: How to set up "Do" or "While" loops for several seperate commands
- From: "ben" <benjamin.friedrich at gmail.com>
- Date: Tue, 9 May 2006 03:50:07 -0400 (EDT)
- References: <e3peic$ig3$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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