백준 10951) A+B – 4
전체 코드 #include <iostream> int main() { int A, B; while (true) { std::cin >> A >> B; if (std::cin.eof()) break; std::cout << A + B << std::endl; } } 설명 백준 10952 A+B -5 문제와 거의 유사 무한 루프가 있는 조건문 A와 B를 먼저 입력 std::cin.eof()로 eof가 감지되면 중단하고 루프를 종료한 후 종료합니다. if … Read more