0

Error called undefined reference

I wrote a code for my studies and i need to use void function and if - else if . I wrote it but its not running. What should i do ? Anyone can help me . Thank you .

20th Jul 2020, 12:24 PM
Abdulaziz
17 Respostas
+ 2
for ur point n3 i am not trying to compare values i am trying to set a condition if the average is equal to 0 and averge lees than 49 i want the program to out put ur grade is this .... and ur gpa is this ...
20th Jul 2020, 1:35 PM
Abdulaziz
+ 2
Abdulaziz, that is what called comparison
20th Jul 2020, 1:37 PM
Lakshay Mittal
Lakshay Mittal - avatar
+ 1
4 Thing I found wrong, 1. findLowest() function have different datatypes for its arguments in prototype and definition. 2.findLowest() function do not return anything. 3. Algorithm to calculate average is not defined. 4. Use == for comparison instead of just a single =.
20th Jul 2020, 1:00 PM
Lakshay Mittal
Lakshay Mittal - avatar
+ 1
i solved the problem of the error. now i am trying to solve the averge calculation fourmela problem .
20th Jul 2020, 1:33 PM
Abdulaziz
+ 1
how to solve problem number 2 ?
20th Jul 2020, 1:35 PM
Abdulaziz
+ 1
ohh ok i messd up šŸ’”
20th Jul 2020, 1:37 PM
Abdulaziz
+ 1
calculate the average first, then assign it to average variable...then do the if else stmt
20th Jul 2020, 2:26 PM
durian
durian - avatar
+ 1
Resolved the error code. Made few changes in FindLowest. It would be more easier if you use for loop instead of if/else if in FindLowest function. Hope help full... https://code.sololearn.com/c4RdNkkedmNv/?ref=app
21st Jul 2020, 3:12 PM
naresh
naresh - avatar
0
Sharing your code snippet can help find the error. Please do the same if you want your query solved.
20th Jul 2020, 12:39 PM
Lakshay Mittal
Lakshay Mittal - avatar
0
I don't know how to share my code I'm new to this app
20th Jul 2020, 12:41 PM
Abdulaziz
20th Jul 2020, 12:41 PM
Abdulaziz
0
i need the program to calculate the averge of 4 lap marks using void functions .
20th Jul 2020, 12:43 PM
Abdulaziz
0
Error called undefined reference is because of 1st point I mentioned.
20th Jul 2020, 1:04 PM
Lakshay Mittal
Lakshay Mittal - avatar
0
that findlowest method is wrong 1.u dont return anything,it must return int 2.the average variable,it is undefined.u are not assigning it to any value, but yet u use it inside the if else stmt 3.inside the if else statement, use == or === for comparasion not =
20th Jul 2020, 1:07 PM
durian
durian - avatar
0
thank you Naresh but my teacher asked for if / if else .
21st Jul 2020, 3:15 PM
Abdulaziz
0
i solved all problems now and codde working fully
21st Jul 2020, 3:15 PM
Abdulaziz
0
Thanks everyone
21st Jul 2020, 3:15 PM
Abdulaziz