0

What is this code have a some compiler error?

https://code.sololearn.com/cAua6HgTRqaF/?ref=app

2nd Jun 2017, 6:45 PM
atul Kumar gupta
atul Kumar gupta - avatar
8 Antworten
+ 16
No error for me...
2nd Jun 2017, 6:47 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 16
as @Valentin, it is compiling normally. no error in the code.
2nd Jun 2017, 6:57 PM
Mohammad Dakdouk
Mohammad Dakdouk - avatar
+ 3
Oh okay. So your function might not reach a return if you enter the same number for every input. If you add one last 'else', it should fix your problem. Like this: // ...... else if(d>a && d>b && d>c) {return d;} } else { /* new code is here*/ return -1; }
3rd Jun 2017, 7:31 AM
Zeke Williams
Zeke Williams - avatar
+ 2
There could be a problem, just for functionality, if the largest number is entered twice. It compiles fine for me though.
2nd Jun 2017, 11:15 PM
Zeke Williams
Zeke Williams - avatar
+ 1
We shouldn't guess what the error is. Post it.
2nd Jun 2017, 7:46 PM
Igor B
Igor B - avatar
+ 1
thw website says that.... c 17 control reaches end of non-void function [-Werror=retuen-type]
3rd Jun 2017, 3:30 AM
atul Kumar gupta
atul Kumar gupta - avatar
0
ya.... but a other website says that there is some compile error in c17
2nd Jun 2017, 6:48 PM
atul Kumar gupta
atul Kumar gupta - avatar
0
suggestions pls..
2nd Jun 2017, 6:51 PM
atul Kumar gupta
atul Kumar gupta - avatar