Answer:
The code to this question can be given as:
Code 1:
printf("%d\\",monthSales[9]); //prints value.
Code 2:
for (int count=50; count>0; count--) //for loop
{
printf("%d ",count); //print number that is separated by spaces.
}
Explanation:
The explanation of the above code as follows:
- In code 1, It is given that an integer array is defined that is "monthSales" which contains the sales data. We know that array indexing always starts with 0. So, in October month will contain index value 9.
- In code 2, We use the for loop in the loop we an integer variable that is count. Which prints number 50 to 1 in reverse order and all numbers separated by space.