#include <iostream>
int main() {
int num,ok;
ok = 0;
while (!ok) {
cout << "Enter an even number: ";
cin >> num;
if (num % 2 == 0 )
cout << num << " is even!" << endl;
else cout <<"The number is not a positive even number."<< endl;
}
return 0;
}
이 코딩을 썻는데요
아웃컴이
CSE 1020 Lab 9 Keon Noh [email protected] Enter an even number: 1 The number is not a positive even number. Enter an even number: 2 2 is even! Enter an even number: 3 The number is not a positive even number. Enter an even number: 4 4 is even! Enter an even number: 4 is even! Enter an even number: 4 is even! Enter an even number: 4 is even! Enter an even number: 4 is even! Enter an even number: 4 is even! Enter an even number: 4 is even! Enter an even number: 4 is even! Enter an even number: 4 is even! Enter an even number: 4 is even! Enter an even number: 4 is even! Enter an even number: 4 is even!
멈추지를 않네요... 이걸 어찌하나요 ㅠㅠ 도와주세요!