import java.io.*;
public class Test {
public static void main (String[] args)
{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int a, b, c;
try {
a = Integer.parseInt(in.readLine());
b = Integer.parseInt(in.readLine());
c = a + b;
System.out.println(c);
}
catch (IOException ignored) {}
}
}
import java.io.*;
public class Test {
public static void main (String[] args)
{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int a, b, c;
try {
System.out.print("最初の数値は? ");
a = Integer.parseInt(in.readLine());
System.out.print("2番目の数値は? ");
b = Integer.parseInt(in.readLine());
c = a + b;
System.out.println("結果は " + c + " です");
}
catch (IOException ignored) {}
}
}
| C++自学・自習目次 | ホームページ |