Created
November 30, 2012 21:19
-
-
Save 0x000000AC/4178705 to your computer and use it in GitHub Desktop.
I wanted to figure out how to print something a given number of times with a 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
/*********************************************** | |
* printLoop.java | |
* Aaron P. Clark | |
* | |
* Created from pseudocode in Ch. 2 of Park Univ. | |
* book. I wanted to figure out how to print something | |
* a given number of times. | |
***********************************************/ | |
// Created from pseudocode in Ch. 2 of Park University book. | |
//I wanted to figure out how to print something a given number of times. | |
import java.util.Scanner; | |
public class printLoop | |
{ | |
public static void main(String args[]) | |
{ | |
for (int i =1; i<=2; i++) // For loop starts at 1 and ends at 2 | |
{ | |
System.out.println("Talking"); | |
} | |
System.out.println("End of Count!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment