76 273
Assignments Done
Successfully Done
In May 2019

Answer to Question #17761 in C++ for apoorva

Question #17761
write a function that takes two int arguments and returns reference of the odd number out of two.If both the arguments are odd,then the reference of the smaller one is returned. dont use printf n cin.getline .
Expert's answer

int& func(int& first, int& second)
if(first & 1 && second & 1)
return first>second?first:second;
else if(first & 1)
return first;
else if(second & 1)
return second;
return first>second?first:second;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions