.
~cpp #include <iostream> // iostream . #include <ctime> // time(0) . using namespace std; int main() { srand(time(0)); // rand() 값 . // 값 . -_-;; int x = rand(); // rand() . // 0 ~ . int x1 = rand() % 10; // % 10 x1 10 // 0 ~ 9 까 게 갑. int x2 = rand() % 9 + 1; // % 9 0~8까 갈 고 // 거기 1 1~9 까 . return 0; }