here is my code.
during seconf input it always shows yes and no as ans.
Odd even . dont understanding the problem in my code
Hey!
Please check the comments in the code below
Thanks!
i got the correct ans but in line 32 what is the use of " || ".
It’s logical OR operator
if((sumofeven%4==0) || (sumofodd%3==0))
this means that whenever either one or both conditions will be true, the if block statement will execute, which in this case is cout<<“Yes”
Hey!
Please mark the doubt as resolved if you’re satisfied with the explanation. And also rate your experience as well.
Thanks!