데블2006//문/if-else/ ¶
1번문
~cpp #include <iostream> using namespace std; int main (void) { int i, n; while (1) { cout << endl << "50~100 :"; cin >> i; if ( i >= 50 && i <= 100 ) { cout << "3배" <<endl; for(n = 0; n <= i; n=3+n) { if ( n != 0 ) cout << n<<" "; } cout << endl; cout << "5 배" <<endl; for(n = 0; n <= i; n=5+n) { if ( n != 0 ) cout << n <<" "; } } else { cout << "못" <<endl; } } return 0; }