Last active
August 29, 2015 14:13
-
-
Save takanakahiko/7149bb78b75b92a0c584 to your computer and use it in GitHub Desktop.
繰り返しの繰り返し
This file contains hidden or 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
class ForFor{ | |
public static void main(String[] args){ | |
System.out.println("a回繰り返す中でb回繰り返すよ!"); | |
int a = Integer.parseInt(System.console().readLine("a=")); | |
int b = Integer.parseInt(System.console().readLine("b=")); | |
for(int i = 0; i < a; i++){ //a回繰り返す | |
for(int j = 0; j < b; j++){ //b回繰り返す | |
System.out.printf("i:%d\tj:%d\n",i,j); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment