반복문 썸네일형 리스트형 [C++] 조건문과 반복문 (2) 1. 비정상적인 루프 종료 1. break구문 #include using namespace std; int main() { int input, sum = 0; cout > input; if (input < 0) break; //바로 반복문 빠져나감 sum += input; } cout 더보기 [C++] 조건문과 반복문 (1) 1. Boolean Expression(참/거짓) int main() { bool a = true; bool b = (10 >= 5); bool c = 0; cout 더보기 이전 1 다음 반응형