Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - There is a plastic array of 20 elements, and the program should complete the following functions.
There is a plastic array of 20 elements, and the program should complete the following functions.
The variable sum has no initial value.

# contains "stdio.h"

# contains "stdlib.h"

int? Master ()

{

int? a[2 1],I;

int? sum = 0;

for(I = 1; I & lt=20; i++)

a[I]= rand()% 50;

for(I = 1; I & lt=20; i++)

{

printf("%d?" ,a[I]);

If (i%5==0)

printf(" \ n ");

}

for(I = 1; I & lt=20; i++)

If (i%2! =0)

sum+= a[I];

printf("%d ",sum);

}