4 ms·
I think hahamrfunnyguy must have meant "convert the numbers to strings" - that's the only way I can make sense of it. quiz.txt must contain code, not sample dat
by tomjupiter 3y ago
I think hahamrfunnyguy must have meant "convert the numbers to strings" - that's the only way I can make sense of it. quiz.txt must contain code, not sample data.
- hahamrfunnyguy 3y agoYes, quiz.txt was the start of a C# program with a main method and a function that was called to do the work asked. The common string based solution was to use a for loop, convert the counter to a string, parse the digits converting each one to a an integer and performing the calculation. The exercise was given in C# so candidates just use string interpolation to output the result