Talk:FiM++/@comment-77.78.117.13-20141217215227
Back to page
58pages on
this wiki
this wiki
There is mistake in function how to add: it has no return statement, so in row Did you know that the number the answer was how to add using 1 and 100?
is no value assigned to variable "the answer", because functioon how to add has no return value.
And it also has totally no sense in java equivalent.
public static double howToAdd(double first, double last) {
double sum = 0; while (first <= last) { sum = sum + first;;; first++; } }
it is missing return statement and three times ; is completely meaningless.