Jolly Jumpers ¶
~cpp #include <iostream> using namespace std; const int size = 65535; void check_possible (int max); // Jolly 능 void check_Jolly (int max, int ar[]); // Jolly부를 void show_num (int max, int ar[]); // int main() { int array[size]; int num; int total_num = 0; int i = 0; cout << "를 (료 : q) : "; while (cin >> num) { if (i == 0 && num > 3000) // 번 3000 는 { system("cls"); cout << "번 는 3000 는 됩." << "를 (료 : q) : "; continue; } if (num <= 0) // 0 는 { system("cls"); cout << "1 를 ." << "를 (료 : q) : "; continue; } array[i] = num; i++; system("cls"); show_num (i + 1, array); cout << "를 (료 : q) : "; } system("cls"); total_num = i + 1; check_possible (total_num); show_num (total_num, array); check_Jolly( total_num, array); return 0; } void check_possible (int max) { if (max <= 1) { cout << " . 램 료." << endl; exit(0); } } void check_Jolly (int max, int ar[]) { int temp; for (int i = 1; i < max - 1; i++) { for (int j = 0; j < max - 1; j++) { temp = ar[j] - ar[j + 1] ; if (temp < 0) temp = -temp; if (temp == i) break; } if (temp != i) { cout << "*** Not Jolly ***" << endl; exit(0); } } cout << "*** Jolly ***" << endl; } void show_num (int max, int ar[]) { cout << "<Numbers Inputed>" << endl; for (int i = 0; i < max - 1; i++) cout << ar[i] << " "; cout << endl; }
Thread ¶
만 램 (?) 뿌듯. 뭐 문 면 -_-;;; .
문 대 맞 램 . -- 보
문 대 맞 램 . -- 보