Commit aec8f00e by ilahma

Add new file

parent aeef1f62
Showing with 31 additions and 0 deletions
#include <stdio.h>
int main() {
int array[12];
int i;
int j;
float sum=0;
float avg=0;
for(i=0;i<12;i++) {
printf("Please, enter a number:\n");
scanf("%d",&array[i]);
if((array[i]%2)!=0) {
j++;
sum=sum+array[i];
}
}
avg=sum/j;
printf("%f",avg);
return 0;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment