#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
cout<<"现在开始一个掷色子游戏。"<<endl;
cout<<"色子已经抛出。"<<endl;
srand(time(0));
int randomNumber=rand();
int die=(randomNumber%6)+1;
cout<<"你掷出了"<<die<<"点"<<endl;
return 0;
}
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
cout<<"现在开始一个掷色子游戏。"<<endl;
cout<<"色子已经抛出。"<<endl;
srand(time(0));
int randomNumber=rand();
int die=(randomNumber%6)+1;
cout<<"你掷出了"<<die<<"点"<<endl;
return 0;
}