https://www.acmicpc.net/problem/10869
10869번: 사칙연산
두 자연수 A와 B가 주어진다. 이때, A+B, A-B, A*B, A/B(몫), A%B(나머지)를 출력하는 프로그램을 작성하시오.
www.acmicpc.net
이 문제는 글을 쓰기도 참.. 민망한 문제였어요. 기록입니다 기록!
#include <iostream>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
cout << a+b<<endl;
cout << a-b<<endl;
cout << a*b<<endl;
cout << a/b<<endl;
cout << a%b<<endl;
return 0;
}
'OnlineJudge' 카테고리의 다른 글
Baek Joon Algorithm(백준 알고리즘): 10998번 (0) | 2019.08.27 |
---|---|
Baek Joon Algorithm(백준 알고리즘): 10871번 (0) | 2019.08.27 |
Baek Joon Algorithm(백준 알고리즘): 10828번 (0) | 2019.08.27 |
Baek Joon Algorithm(백준 알고리즘): 10430번 (0) | 2019.08.27 |
Baek Joon Algorithm(백준 알고리즘): 2884번 (0) | 2019.08.27 |