http://www.codechef.com/problems/COINS for this question i have written a code http://www.codechef.com/viewsolution/6885244 . Kindly let me know what is wrong with my code . I am a newbie and I am coding in C++ 4.3.2 what is wrong with my code ?????? asked 12 May '15, 16:35 ![]()
|
Declare y and z outside do while loop,otherwise they are getting repeatedly declared. Logic is correct . return sum only if sum>x(or y or z) otherwise it wont give correct answer Try for input 11 24 13 25 16 ans should be 11 27 13 25 17 answered 31 May '17, 18:01 ![]()
|