This is what I have, but I need to make a for loop instead of the initialize steep. PLEASE HELP

int main ()
	int numb[10];//1,2,4,8,16,32,64,128,256,512
	int numb2[10];
	int counter, counter2;

	for (int z=0; z<10; z++)
			cout<<numb[z]<<" ";

	for (int x=0; x<10; x++)
			cout<<numb2[x]<<" ";

return 0;

Initializing numb is easy. Just start at 1 and double the last value until you get to the size of the array:

int k = 1;

for (int i = 0; i < 10; ++i) {
  numb[i] = k;
  k *= 2;

Initializing numb2 is a lot harder. Edward can't find a good pattern in the current list of numbers. Alternating between adding by 5 and dividing by 2 is close, but far enough off that I'm not sure if that's what you're looking for.

Thank You but this only helps with half

for( int i=0 ; i<10 ; ++i )
    numb2[i] = i%2 == 0 ? (i/2)*5 : i ;

the numbers should be 0,1,5,3,10,5,15,7,20,9
even positions have values 0,5,10...
odd positions have values 1,3,5...

This question has already been answered. Start a new discussion instead.