고수님들 오류 좀봐주세요ㅜ
한누리
질문 제목 : 오류좀 봐주세요 ~ ㅜㅜ질문 요약 :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);
}
}
번호 | 제 목 | 글쓴이 | 날짜 |
---|---|---|---|
2695270 | 질문이요..swap 관한겁니다..ㅠㅠ (3) | 콩알녀 | 2025-05-19 |
2695244 | 노땅초보궁금한게 하나 있는데요..반복문(while문)초보자질문 (6) | 큰꽃늘 | 2025-05-18 |
2695166 | do while 문 어떤것이잘못된건지 모르겠어요 (2) | 아이폰 | 2025-05-18 |
2695122 | 구조체에 대해 물어보고 싶은게 있습니다 ^^^.. (7) | 수련 | 2025-05-17 |
2695091 | txt 파일 입출력 후 2차 배열에 저장하기입니다. (3) | 헛장사 | 2025-05-17 |
2695063 | 수도요금 프로그램좀 짜주세요. | 시내 | 2025-05-17 |
2695033 | 답변좀요ㅠㅠ (1) | 비사벌 | 2025-05-16 |
2695010 | C++의 STL은 왜 굳이 템플릿화 시켜서 라이브러리를 만드나요? (초보수준의 질문..) (2) | 엘보어 | 2025-05-16 |
2694958 | 로직이 변한다는 것에 대해서 궁금합니다. | 튼동 | 2025-05-16 |
2694929 | 열혈강의 25-2 두번째 문제 질문 | 지우개 | 2025-05-15 |
2694900 | dequeue 에서 리턴값 프린트 방법알려주세요 오늘 12시까지 대화방에 있습니다 도와주세요 | 미투리 | 2025-05-15 |
2694854 | 절대값을 구할때 (2) | 그녀는귀여웠다 | 2025-05-15 |
2694827 | 이제 어떻게 공부해야할지 모르겠네요 | 새얀 | 2025-05-14 |
2694778 | 순열 계산요. | 맛조이 | 2025-05-14 |
2694754 | ShowWindow 함수를 이용하려 하는데 질문있습니다. (2) | 파도 | 2025-05-14 |
2694731 | 리눅스 커널의 시작점 질문 | 미르 | 2025-05-13 |
2694702 | 이거 뭐가문제인가요 코드수정좀 (3) | 맑은 | 2025-05-13 |
2694675 | C언어 후위표기를 중위표기로 | 앨런 | 2025-05-13 |
2694646 | 안녕하세요 파일 합치기 함수! (1) | 연블루 | 2025-05-13 |
2694618 | 잘몰라서 설명부탁드립니다. scanf 관련 (3) | 파라 | 2025-05-12 |