랜덤 법다.
~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; }