When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.
1 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.
last code:
int marge(int num1,int num2) { long marge = 0; int count = 0; while (num1 || num2) { if (count % 2 && num1 > 0) { marge += num1 % 10 * (int)pow(10, count); num1 /= 10; count++; } if (!(count % 2) && num2 > 0) { marge += num2 % 10 * (int)pow(10, count); num2 /= 10; count++; } } return (marge); }
why is this code does not return anything while the last version does and i didnt change much