22 lines
294 B
C
22 lines
294 B
C
#include <stdio.h>
|
|
|
|
int main(){
|
|
int num[30], i, j;
|
|
float result[6];
|
|
for(i=0;i<30;i++){
|
|
num[i] = 2+2*i;
|
|
}
|
|
|
|
for(i=0;i<30;i+=5){
|
|
result[i/5] = (num[i]+ num[i+1] + num[i+2] + num[i+3] + num[i+4])/5.0;
|
|
}
|
|
|
|
for(i=0;i<6;i++){
|
|
printf("%.2f ", result[i]);
|
|
}
|
|
printf("\n");
|
|
|
|
return 0;
|
|
}
|
|
|