2. Write a program statement that will do the following to array B
shown below:
int B[15];
for(j=0;j<=14;j++)
{
B[j]=j;
}
2.1 Print all elements of array B.
2.2 Print all elements of array B in reverse order (14,13,12,11,10 ...1)
2.3 Replace the value of third elements with 100.
2.4 Copy the value of last elements into the
first one.
2.5 Find the sum of the first five elements.
2.6 Find the sum of element 10 to element 15
2.7 Read 15 integers from the user, store into array B and find the largest
No comments:
Post a Comment