Created
November 28, 2011 08:33
-
-
Save mojaie/1399623 to your computer and use it in GitHub Desktop.
Example:Scanner.nextInt
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
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
System.out.println(“整数を2つ入力してください。”); | |
String x = in.nextInt(); | |
String y = in.nextInt(); | |
System.out.println(“入力した整数1は ” + x + ” です。”); | |
System.out.println(“入力した整数2は ” + y + ” です。”); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment