1234567891011121314151617181920
#include "stdafx.h" #include "math.h" #include <Windows.h> #include <iostream> #include <fstream> #include <string> using namespace std; int main() { int RandRoll=0; RandRoll=rand() % 8 + 1; cout<<"Random roll = "<<RandRoll<<endl; return 0; }
123456
int main() { // do this only once: srand( (unsigned)time(0) ); //...