고수님들 오류 좀봐주세요ㅜ
한누리
질문 제목 : 오류좀 봐주세요 ~ ㅜㅜ질문 요약 :input함수와 process함수를 정의하는건데
process 부분에서 오류가 자꾸나네요 ㅜ(빨간색부분)질문 내용 :#include stdio.h
#include stdlib.h
#define size 7
#define upper 100.0
#define lower 60.0
int man;
void input(float data[ ]); ///프로토 타입///
float process(float data[ ], float total, float max, float min); ////프로토 타입///
int main(void)
{
float data[size];
float total = 0.0, max = 0.0, min = upper;
float score;
printf(\n\t\t 체조 경기장의 점수 산정 프로그램 );
for (man = 0; man size; man++)
{
printf(\n\t %d 채점관 = %.2f, man + 1, data[man]);
}
printf(\n\t 최고 점수 : %.2f, max);
printf(\n\t 최하 점수 : %.2f, min);
printf(\n\t 점수 총계 : %.2f, total);
printf(\n\t 평 균 : %.2f\n, score);
input(data); ///함수 호출//
score = process(data, total, max, min); ///함수호출///
system(pause);
}
void input(float data[ ]) ///함수의 정의///
{
man = 0;
while (man size)
{
printf(\n\t\t\t 제 %d 채점관 : , man + 1);
scanf(%f, &data[man]);
if (data[man] = lower && data[man] = upper)
man++;
else
printf( error : 점수는 60점 - 100점 사이\a\a\a\n);
}
float process(float data[ ], float total, float max, float min) ///함수의 정의///
{
float score;
for (man = 0; man size; man++)
total += data[man];
for (man = 0; man size; ++man)
{
if (max data[man])
max = data[man];
if (min data[man])
min = data[man];
}
total = total - (max + min);
score = (float) total / (size - 2);
return (score);
}
}