https://www.acmicpc.net/step/1
1000 A+B
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int A = in.nextInt();
int B = in.nextInt();
System.out.println(A+B);
in.close();
}
}
1001 A-B
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int A = in.nextInt();
int B = in.nextInt();
System.out.println(A-B);
in.close();
}
}
10998 AxB
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int A = in.nextInt();
int B = in.nextInt();
System.out.println(A*B);
in.close();
}
}
1008 A/B
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
double a=in.nextDouble();
double b=in.nextDouble();
in.close();
System.out.print(a/b);
}
}
10869 사칙연산
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int A = in.nextInt();
int B = in.nextInt();
System.out.println(A+B);
System.out.println(A-B);
System.out.println(A*B);
System.out.println(A/B);
System.out.println(A%B);
in.close();
}
}