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; }