Re: [Dev-C++] Newbie: setting vars with for loop trouble.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Neszt T. <ne...@ss...> - 2004-06-17 20:50:28
|
> Is there a better way to do this? Im not supposed to use an array for
> this assignment
Why?
I suggest this trivial soluton:
int die[6];
void rollDice() {
int i;
for (i=0 ; i<6 ; i++) {
die[i] = i+1;
}
}
Regards,
Neszt Tibor
|