I'm assuming you're doing this to learn Java, so this should get you started:

int counter = 0; // Declare your variables
int value = 1;
int max = 10; // You can define ("hard code") this, or read it in
while(counter < max) {
System.out.println(value + " "); // This handles printing
value = value * 2;
counter++; // This will track how many numbers have already been printed
}

You can use that as a basis for figuring out the cubic part. The mechanics are essentially the same.

I'm assuming you're doing this to learn Java, so this should get you started:

int counter = 0; // Declare your variables
int value = 1;
int max = 10; // You can define ("hard code") this, or read it in
while(counter < max) {
System.out.println(value + " "); // This handles printing
value = value * 2;
counter++; // This will track how many numbers have already been printed
}

You can use that as a basis for figuring out the cubic part. The mechanics are essentially the same.

two remarks:
1 -> don't spoon feed code.
2 -> if you feel the need to spoon feed code anyway, make sure your code makes sense. I doubt you'll find the square root of 25 by value= value*2

Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...

When I execute this progammatically, I get a table with row heights much larger than when I do this manually.

Note : Sel is the Word.Selection object and the Clipboard contains an Excel Table.

public void AddClipboard()
{
Sel.PasteExcelTable(false,false, false);
var t = Sel.Tables[Sel.Tables.Count];
t.AutoFitBehavior(Word.WdAutoFitBehavior.wdAutoFitContent);
}

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...