고수님들 오류 좀봐주세요ㅜ
한누리
질문 제목 : 오류좀 봐주세요 ~ ㅜㅜ질문 요약 :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);
}
}
번호 | 제 목 | 글쓴이 | 날짜 |
---|---|---|---|
2685477 | 소수점이하 출력하는거요 | 널위해 | 2025-02-18 |
2685449 | printf배우고있는데요 궁금한게있어요 (8) | 꽃큰 | 2025-02-18 |
2685393 | c언어 질문이요.... | 붕붕 | 2025-02-18 |
2685365 | 윈도우7에서 visual studio c++6.0 (1) | 빛길 | 2025-02-17 |
2685317 | segmentation fault가 나요 | 가람 | 2025-02-17 |
2685292 | 다중스택질문 | 올해1살 | 2025-02-17 |
2685231 | C언어와 닷넷에 대해서 질문!! (2) | 설아 | 2025-02-16 |
2685206 | VisualBasic 과 DEV++ 의 장단점과 만든 파일 호환 가능하나요? | 에드워드 | 2025-02-16 |
2685154 | 배열 크기조절 | 해찬솔 | 2025-02-15 |
2685124 | 수정이거 제가 뭐가 잘못한거죠 ? | 아이돌 | 2025-02-15 |
2685096 | 포인터의 고수분들 모두 보세요!! 제발 ㅠ_ㅠ 헷갈려헷갈려..갈려헷.. (7) | 치킨마루 | 2025-02-15 |
2685045 | 전처리기 질문 | 치에미 | 2025-02-14 |
2685016 | 오류 좀 확인해 주시면 감사하겠습니다 | 초코맛사탕 | 2025-02-14 |
2684917 | 알고리즘을 이용한 행렬의 전치// 문제다운 문제네요. | 뿡뿡 | 2025-02-13 |
2684868 | 양방향 연결리스트에서 실행도중 죽는 이유좀 찾아주세요. (2) | 예다움 | 2025-02-13 |
2684844 | 시계프로그램인데 도저히 모르겠어요ㅠ (1) | 비내리던날 | 2025-02-12 |
2684812 | 레포트좀도와주세요ㅠㅠ (2) | 갈매빛 | 2025-02-12 |
2684780 | 채팅창 흉내내보려고하는데요 ㅜ.ㅜ (1) | 바름 | 2025-02-12 |
2684729 | 내일 시험인데 메모리 그리는것좀 도와주세요 ㅠ (1) | 상처주지마 | 2025-02-11 |
2684701 | 버퍼 관련 질문 3가지 (이전거랑 달라요) | 한국녀 | 2025-02-11 |