Homework 1 issues
The algorithm cannot be considered an algorithm - very superficial
Code:
- if(result!=result) <- working depends on a compiler, should be done another way (check next point)
- you should check whether the value is complex or infinite before calulating y by checking that the value under squareroot is >=0 and denominator is not zero
- toCalculate is a single variable in your case, you cannot store several values (didn't notice that it was inside a loop <- is OK)
Please
register
or
sign in
to comment