프로그래밍을 배우려고합니다. 간단한 질문이지만 해결할 수 없습니다. 왜 오류가 발생합니까? 무엇이 잘못 되었나요? 어떻게하면됩니까? 이 문제를 해결 도와주세요 여기 [오류] : 예상 '('시간 전 '
는 문제 정의하고 내 코드 :..#include<stdio.h>
void calculateCharged(int c) {
int a;
int hours = scanf("%d", &a);
int totalFee = 25;
}
int main(void) {
int i;
int b;
printf("Please Enter Number of Cars ");
scanf("%d", &i);
for (b = 0; b < i; b++) {
calculateCharged(hours)
if (hours)<8
totalFee += hours * 0, 5
else if hours < 24
int additionalHours = hours - 7
totalFee += additionalHours * 5
totalFee += hours * 0, 5
else
int days = hours/24
int extraHours = hours % 24
totalFee += days * 50
totalFee += days * 24 * 0, 5
totalFee += extraHours * 5
totalFee += extraHours * 0, 5
}
}
없음 이미지와 C/C++하십시오 태그. [묻는 방법] (http://stackoverflow.com/help/how-to-ask)을 읽어보십시오. –
수백만 개의 오류가 있습니다. C로 책을 가져 가야합니다. – George
아직 언어를 배우지 않았기 때문에 오류가 발생합니다. [좋은 초보자를 찾으십시오.] (http://stackoverflow.com/questions/562303/the-definitive-c-book-guide-and-list) 읽고 간단한 것을 다시 시작하십시오. –