본문 바로가기
반응형

category/백준 알고리즘 c++42

백준 알고리즘 14681번 사분면 고르기 c++ 요약 : x와 y 입력 후 해당 좌표가 몇 사분면인지 확인하는 문제 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a,b; cin >> a >> b; if(a>0&&b>0) cout 2020. 12. 3.
백준 알고리즘 2753번 윤년 c++ 요약 : 년도 입력 후 이 년도가 윤년인지 아닌지 확인하는 문제 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a; cin >> a; if(a%4==0) { if(a%400==0) cout 2020. 12. 3.
백준 알고리즘 9498번 시험 성적 c++ 요약 : 시험 점수를 입력받고 점수에 따라서 학점을 매긴다. 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a; cin >> a; a = a/10; if(a==10||a==9) cout 2020. 12. 3.
백준 알고리즘 1330번 두 수 비교하기 c++ 요약 : 두 수의 값을 비교하여 >, > a >> b; if(a>b) cout 2020. 12. 3.
백준 알고리즘 2588번 곱셈 c++ 요약 : A와 B 입력 후 두 수의 곱셈 과정을 출력 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a,b; cin >> a >> b; cout 2020. 12. 3.
백준 알고리즘 10430번 나머지 c++ 요약 : A, B, C의 값 입력 후 연산 값 출력 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a,b,c; cin >> a >> b >> c; cout 2020. 12. 3.
백준 알고리즘 10869번 사칙연산 c++ 요약 : A와 B 입력 후 A+B, A-B, A*B, A/B, A%B연산의 결과값 출력 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include using namespace std; int main(void) { ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0); int a,b; cin >> a >> b; cout 2020. 12. 3.
백준 알고리즘 1008번 A/B c++ 요약 : A와 B 입력 후 A/B값 출력, 10의 -9승만큼 오차 허용 즉 소수점 9번째 자리 보다 더 길게 출력 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #include using namespace std; int main(void) { ios_base :: sync_with_stdio(false); cin.tie(0); cout.tie(0); double a,b; cin >> a >> b; cout.precision(15); //15자리 출력 cout 2020. 12. 3.
백준 알고리즘 10998번 AxB c++ 요약 : A와 B 입력 후 A*B 출력 소스코드 1 2 3 4 5 6 7 8 9 10 11 #include using namespace std; int main(void) { cin.tie(0); int a,b; cin >> a >> b; cout 2020. 12. 3.
반응형