lang
1 2 3class Ideone 4{ 5 public static void main (String[] args) throws java.lang.Exception 6 { 7 // your code goes here 8 System.out.println("あなたの名前を入力してください。"); 9 String name= new java.util.Scanner(System.in).nextLine(); 10 System.out.println("あなたの年齢を入力してください。"); 11 int age= new java.util.Scanner(System.in).nextInt(); 12 System.out.println("ようこそ"+ age + "才の"+ name + "さん"); 13 } 14}
このコードをIdeoneで実行したところ
Runtime error time: 0.09 memory: 380608 signal:-1 あなたの名前を入力してください。 あなたの年齢を入力してください。
と出ます。間違いはどこでしょうか?
また、signal:-1とはどういう意味でしょうか?
inputの所には「t」と「123」と入れています。どちらも半角です。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。