Wikia

FiM++ Community Wiki

Talk:FiM++/@comment-77.78.117.13-20141217215227

Back to page

Revision as of 04:53, January 18, 2015 by Supuhstar (wall | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
58pages on
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.

Around Wikia's network

Random Wiki