Question: C PROGRAMMING Write a program that declares a 40 element array of type int. Initialize the array so that: the first 10 elements are equal

C PROGRAMMING

Write a program that declares a 40 element array of type int. Initialize the array so that:

the first 10 elements are equal to the square of the index variable

the next 10 each elements is equal to three times the index variable

the next 10 each element is equal to the product of an element in the first 10 * an element in the second 10

the last 10 each element is equal to 10 * an element in previous 10

Output the array so that 10 elements per line are printed

The output should look like:

 0 1 4 9 16 25 36 49 64 81 30 33 36 39 42 45 48 51 54 57 0 33 144 351 672 1125 1728 2499 3456 4617 0 330 1440 3510 6720 11250 17280 24990 34560 46170

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!