how this can be done
if the number of generating " myArray[i]" for many times depends on a number entered by the user.
for example:.
if the user enter 3
- the program will generate it something like the following
myArray[i] + myArray[i+1] + myArray[i+2] // (1)
else if the user enter 4
the following will be generated
myArray[i] + myArray[i+1] + myArray[i+2] + myArray[i+3] // (2)
i need to use the result of (1) or (2) in another "for loop", as
for(int i =0;i<10;i++)
{
// the problem how to get the following from the previous (1) or (2)
// to make " i " used by the second for loop
myArray[i] + myArray[i+1] + myArray[i+2]
}
saudyonlinePosted Oct 23, 2004, 7:13 PM
saudyonlinePosted Oct 23, 2004, 6:51 AM
bilnaadPosted Oct 22, 2004, 7:43 PM
saudyonlinePosted Oct 22, 2004, 5:09 PM
Carlos SanchezPosted Oct 20, 2004, 9:57 AM
saudyonlinePosted Oct 20, 2004, 7:08 AM
bilnaadPosted Oct 18, 2004, 8:39 AM
saudyonlinePosted Oct 18, 2004, 8:28 AM
saudyonlinePosted Oct 17, 2004, 4:34 AM
S_KiryazovPosted Oct 16, 2004, 11:24 AM