#include <stdio.h>
#define SIZE 20
int main()
{
int i,quantity[SIZE];
for (i = 0; i < SIZE; i++)
{
printf("quantity[%i] = ",i);
scanf("%i",&quantity[i]);
}
printf("\nOutput\n");
for (i = 0; i < SIZE;i++)
{
printf("quantity[%i] = %i\n",i,quantity[i]);
}
return 0;
}
The highlighted for loop can be used to print the elements of an array.