im not god in programing im stil new to it need help please

find the MAX and MIN number then calculate and display the average [(MAX+MIN)/2]

#include<stdio.h>

int main(void)
int NumArray[] = {2 ,67 ,23 ,5 ,7 ,34 ,14 ,4 ,8 , 62};
int max, min, i;
double b;

max=numArray[i]
min=numArray[i]

for(i=1; i<10;i++)
if(max<numArray[i])
max=numArray[i];

for(i=1; i<10; i++)
if(min>numArray[i])
min=numArray[i];

b=(max+min)/2;

prinf("the average of the maximun and minimum number is %lf", b);

}

Array index in C starts with "0" not "1".So always initialize your array index variable "i" with 0

When asking for help, EXPLAIN what problem you are having. Do not expect us to try to figure out what it does wrong -- tell us!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.