Created
September 25, 2013 15:44
-
-
Save gjb2048/6701603 to your computer and use it in GitHub Desktop.
Sequence to calculate x = y * y - y
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Sequence. | |
* © G J Barnard 2013 - Attribution-NonCommercial-ShareAlike 3.0 Unported - http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB. | |
*/ | |
package sequence; | |
/** | |
* This class outputs a sequence where x = y * y - y. | |
* | |
* @author G J Barnard | |
*/ | |
public class Sequence { | |
public static void main(String[] args) { | |
for (int y = -24; y < 25; y++) { | |
System.out.println(y + " = " + (y * y - y)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment