Копирай ето това:

#include <cstdlib>
#include <ctime>
#include <iostream>

using namespace std;

int main()
{
char fin;
srand((unsigned)time(0));
int random_integer = rand()%6+1;
cout << random_integer << endl;
cin.get(fin);

return 0;
}







Ето тук:

http://www.onlinecompiler.net/index.html

(на мястото на #include <stdio.h> така нататък...)



След това даваш Compile.

Намираш къде пише Link to executable file: НЯКАКВИ СИМВОЛИ


Цъкаш върху НЯКАКВИ СИМВОЛИ

Даваш RUN





Вече имаш отговора.