주사위
~cpp #include<time.h> #include <iostream> using namespace std; int a(); int main() { srand((unsigned)time(0)); cout<<a()<<" "; return 0; } int a() { int i = rand() % 6 + 1; return i; }