Challenge 18 – Write a function to compute the sum of 2 numbers of any numeric type
Challenge #18 involved writing the most compact function to accurately compute the sum of two numbers of the following numeric data types.
Given the following rules:
- Numbers can be any numeric data type.
- Numbers passed to function can be of similar (double, double) or mixed type (i.e. int and double)
- Each number must be within the range of <= 1000 and >= -1000.
The following is the correct response:
Winners (out of approximately 10 respondents)
Thanks everybody for your responses to SCS Coding Challenge #18!!!
Most all respondents came up with good approaches.
Coding Challenge #19
Please stay tuned, SCS Coding Challenge #19 will be published next week. Details will follow. The winner will be awarded based upon the best approach.