"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:At what line do you call your linear equation method?
William Nyqvister wrote:But this confuses me..
"Il y a peu de choses qui me soient impossibles..."
We can probably be of some help if you describe, in words
Lines 66, 67, 68. What these n, k and m mean? What these numbers are?
Apart from calcLine method, the rest working as expected?
William Nyqvister wrote:2: Now we create a method called calcLine, to calculate a line, all y of range from 1 to n, where n is the largest x value that is calculated. So if n is 5, x starts at 1 and ends at 5. The method also takes integer values of k and m, and uses calcPoint to calculate the value of y. The results are returned back to the main method in a integer array, where the position represents x. If n=5, k=1 and m=2 the following should be returned: {0, 3, 4, 5, 6, 7}. Note that position 1 (index 0) is not used when x starts at 1.
Probably you're mistaken here.William Nyqvister wrote:I guess the x is called n in the method to not confuse the user of the code with something else.
To get a wish, you need a genie. To get a genie, you need a lamp. To get a lamp, you need a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filleradvertising
