주사위
~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;
	
}
Retrieved from http://wiki.zeropage.org/wiki.php/데블스캠프2006/월요일/함수/문제풀이/정승희
last modified 2021-02-07 05:29:05