Solution
Code
#include <iostream>
#include<ctime>
using namespace std;
int main()
{
srand((unsigned) time(0));
cout<<"After rolling dice : ";
int dice = 1 + (rand() % 6);
cout<<dice;
}
Screenshot
Output
Get Answers For Free
Most questions answered within 1 hours.