Where is my mistake | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Where is my mistake

Not getting output of cos Inputs are 0 and 6 https://code.sololearn.com/cEmIE3ak6ZCS/?ref=app

2nd Sep 2020, 10:30 AM
Prashant Pandey
Prashant Pandey - avatar
4 Answers
+ 2
Prashant Pandey In fact function you are sending the value of even. If even=0 then your code will through an error. i just gone through with the errors.. not sure about result
2nd Sep 2020, 11:08 AM
Ajith
Ajith - avatar
+ 2
Prashant Pandey The value of even=1 not 0 and and return type of main should be int. Check this... https://code.sololearn.com/cCliHr31w3b9/?ref=app
2nd Sep 2020, 10:59 AM
Ajith
Ajith - avatar
+ 1
Yes got it thanks
2nd Sep 2020, 11:09 AM
Prashant Pandey
Prashant Pandey - avatar
0
No then it gives wrong answer
2nd Sep 2020, 11:06 AM
Prashant Pandey
Prashant Pandey - avatar