new in programming

can anyone help me this question?
2- Write a program that populates an integer array of size 50 with the following sequences:
a. 1, 4, 9, 16, 25, 36, …
b. 1, 1, 2, 4, 3, 9, 4, 16, 5, …
it's a bit urgent
Topic archived. No new replies allowed.