|
|
int
instead of double
.void
return type, because they do not return anything. From about line 8 to line 51 you need to wrap that code inside an int main() { /*code goes here*/ }
||=== c_homework, Debug ===| main.c||In function ‘main’:| main.c|14|warning: variable length array ‘name’ is used [-Wvla]| main.c|15|warning: variable length array ‘assigns’ is used [-Wvla]| main.c|15|warning: variable length array ‘quizzes’ is used [-Wvla]| main.c|15|warning: variable length array ‘exams’ is used [-Wvla]| main.c|22|error: implicit declaration of function ‘readName’ [-Wimplicit-function-declaration]| main.c|24|error: implicit declaration of function ‘fillArray’ [-Wimplicit-function-declaration]| main.c|25|error: implicit declaration of function ‘selectionSort’ [-Wimplicit-function-declaration]| main.c|26|error: implicit declaration of function ‘findMedian’ [-Wimplicit-function-declaration]| main.c|27|error: implicit declaration of function ‘findMean’ [-Wimplicit-function-declaration]| main.c|28|error: implicit declaration of function ‘calcPercentage’ [-Wimplicit-function-declaration]| main.c|51|error: implicit declaration of function ‘displayResults’ [-Wimplicit-function-declaration]| main.c|56|error: implicit declaration of function ‘goAgain’ [-Wimplicit-function-declaration]| main.c|15|warning: unused variable ‘finalExam’ [-Wunused-variable]| main.c|63|warning: no previous declaration for ‘readName’ [-Wmissing-declarations]| main.c||In function ‘readName’:| main.c|67|warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=]| main.c|72|warning: no previous declaration for ‘fillArray’ [-Wmissing-declarations]| main.c||In function ‘fillArray’:| main.c|79|warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=]| main.c|86|warning: no previous declaration for ‘goAgain’ [-Wmissing-declarations]| main.c|106|warning: no previous declaration for ‘selectionSort’ [-Wmissing-declarations]| main.c|126|warning: no previous declaration for ‘findMedian’ [-Wmissing-declarations]| main.c||In function ‘findMedian’:| main.c|130|warning: unused variable ‘median2’ [-Wunused-variable]| main.c|129|warning: unused variable ‘i’ [-Wunused-variable]| main.c|149|warning: no previous declaration for ‘findMean’ [-Wmissing-declarations]| main.c|166|warning: no previous declaration for ‘calcPercentage’ [-Wmissing-declarations]| main.c|166|error: conflicting types for ‘calcPercentage’| main.c|28|note: previous implicit declaration of ‘calcPercentage’ was here| main.c|192|warning: no previous declaration for ‘displayResults’ [-Wmissing-declarations]| main.c|192|error: conflicting types for ‘displayResults’| main.c|51|note: previous implicit declaration of ‘displayResults’ was here| main.c||In function ‘displayResults’:| main.c|204|warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘double’ [-Wformat=]| main.c|205|error: expected expression before ‘)’ token| main.c|206|warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]| main.c|192|warning: unused parameter ‘classPerc’ [-Wunused-parameter]| main.c|192|warning: unused parameter ‘classGrade’ [-Wunused-parameter]| main.c||In function ‘readName’:| main.c|68|warning: control reaches end of non-void function [-Wreturn-type]| main.c||In function ‘fillArray’:| main.c|82|warning: control reaches end of non-void function [-Wreturn-type]| main.c||In function ‘selectionSort’:| main.c|122|warning: control reaches end of non-void function [-Wreturn-type]| ||=== Build finished: 11 errors, 24 warnings (0 minutes, 1 seconds) ===| |