【初心者】Java質問・相談スレッド125【歓迎】
import java.util.Scanner;
class Sample1 {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
System.out.println("xとyを加減乗除します。");
System.out.print("xの値:");
int x = stdIn.nextInt();
System.out.print("yの値;");
int y = stdIn.nextInt();
System.out.println("x + y ="+(x+y));
System.out.println("x - y ="+(x-y));
System.out.println("x * y ="+(x*y));
System.out.println("x / y ="+(x/y));
System.out.println("x % y ="+(x%y));
}
}
何が間違ってるの?