Created
March 23, 2015 19:38
-
-
Save khatchad/e640e696b7aa3114e4c8 to your computer and use it in GitHub Desktop.
This program demonstrates the for loop.
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
/** | |
This program demonstrates the for loop. | |
*/ | |
public class Squares | |
{ | |
public static void main(String [] args) | |
{ | |
int number; // Loop control variable | |
System.out.println("Number Number Squared"); | |
System.out.println("-----------------------"); | |
for (number = 1; number <= 10; number++) | |
{ | |
System.out.println(number + "\t\t" + | |
number * number); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment