2023. 3. 9. 04:26ㆍ백준 알고리즘
import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int a, b;
a = sc.nextInt();
b = sc.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);
}
}
/////////////
using System;
namespace Baekjoon {
class Program {
static void Main() {
string s = Console.ReadLine();
string[] ss = s.Split();
int a = int.Parse(ss[0]);
int b = int.Parse(ss[1]);
Console.WriteLine(a+b);
Console.WriteLine(a-b);
Console.WriteLine(a*b);
Console.WriteLine(a/b);
Console.WriteLine(a%b);
}
}
}
'백준 알고리즘' 카테고리의 다른 글
백준 3003번 JAVA, C# (킹, 퀸, 룩, 비숍, 나이트, 폰) (0) | 2023.03.27 |
---|---|
백준 18108번 1998년생인 내가 태국에서는 2541년생?! C#(JAVA) (0) | 2023.03.10 |
백준 C#, JAVA 10926번 아이디 string 뒤에 ??! 붙이기 (0) | 2023.03.10 |
백준 JAVA, C# 1008번 나눗셈 (0) | 2023.03.08 |
백준 JAVA, C# 2557번 Hello world (0) | 2023.03.08 |