heheh!!. sorry... i'll just show you my code and... just help me where are my mistakes..
thanks again.. and sorry for the trouble...
#include <stdio.h>
#define N 7
void input (float a[], int N);
float highest (float a[], int N);
float lowest (float a[], int N);
float average (float highest, float lowest, float a[], int N);
int main (void)
{
float a[N];
float Highest, Lowest, Average;
input (a[], N);
Highest = highest (a[], N);
Lowest = lowest (a[], N);
Average = average (Highest, Lowest, a[], N);
printf ("Highest : %.2f", Highest);
printf ("Lowest : %.2f", Lowest);
printf ("Average : %.2f", average);
}
void input (float a[], int N)
{
int i;
prinf("Enter the scores of 7 judges:");
for (1=0; i<N; i++)
scanf ("%f", &a[i]);
}
float highest (float a[], int N)
{
int i;
float highest;
highest=a[o];
for (i=1; i<n; i++)
if (highest<a[i])
highest=a[i];
return highest;
}
float lowest (float a[], int N)
{
int i;
float lowest;
lowest=a[0];
for (i=1; i<N; i++)
if (lowest>a[i])
lowest = a[i];
return lowest;
}
float average (float highest, float lowest, float a[], int N)
{
int i;
float highlow, ave, x;
highlow = highest + lowest;
for (i=0; i<N; i++)
sum = sum + a[i];
x = sum - highlow;
ave = x/5.0;
return ave;
}
ps: i've minimized the errors in my code
please HELP me on this i need it working ASAP!..
Error C:\tc2\projecti.c 3: Declaration syntax error
Error C:\tc2\projecti.c 4: Declaration syntax error
Error C:\tc2\projecti.c 5: Declaration syntax error
Error C:\tc2\projecti.c 6: Declaration syntax error
Error C:\tc2\projecti.c 13: Expression syntax in function main
Error C:\tc2\projecti.c 14: Expression syntax in function main
Error C:\tc2\projecti.c 15: Expression syntax in function main
Error C:\tc2\projecti.c 16: Expression syntax in function main
Warning C:\tc2\projecti.c 17: posible use of 'Higest' before definition in function main
Warning C:\tc2\projecti.c 18: posible use of 'Lowest' before definition in function main
Error C:\tc2\projecti.c 23: Declaration syntax error