Simple Dice Roll game Is there a more efficient algorithm to generate random numbers in C++?

(This code is working on Dev-C++, but I'm not sure if it works on a Borland compiler.)

/*
  Author: Arpit Agrawal
  Email: arpitagrawal294@gmail.com
  Description: Dice Roll Algorithm.
  Project Name: e-Roll.

*/


#include&lt;iostream.h&gt;
#include&lt;conio.h&gt;
#include&lt;time.h&gt;
#include&lt;stdlib.h&gt;
#include &lt;stdio.h&gt;  
#include &lt;Windows.h&gt;

void call();
void one();
void two();
void three();
void four();
void five();
void six();
void call();
int main()
{

    //gotoxy(30,15);
    cout&lt;&lt;"\n\n\n\n\t\tAuthor: Arpit Agrawal\n\t\tEmail: arpitagrawal294@gmail.com\n\t\tDescription: Dice Roll Algorithm.\n\t\tProject Name: e-Roll.\n\t\t" ; 
    cout&lt;&lt;"\n\n\t\tLoading. . . . . . . ";
    Sleep(3000);
    cout&lt;&lt;"\n\n\t\tPress r to roll or q to quit the game "&lt;&lt;endl;
    char ch;
    ch = getch();
    xm:
    if (ch=='r'){
    system("cls"); 
    call();  }
    else
    exit (0);
    cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;"Press r to roll again q to quit!";
    ch = getch();
    goto xm;
    getch();
}



    void call()
    {
        srand (time(NULL));

        int n;
        n= rand();
        n = 1 + n % 6;

        switch (n)
        {
         case 1:
              one();
              break;
         case 2:
              two();
              break;
         case 3:
              three();
              break;
         case 4:
              four();
              break;
         case 5:
              five();
              break;
         case 6:
              six();
              break;
         default:
                 cout&lt;&lt;"NONUM";

        }       
    }  


        void one()
        {
        cout &lt;&lt; " -----" &lt;&lt; endl;
        cout &lt;&lt; "|     |" &lt;&lt; endl;
        cout &lt;&lt; "|  O  |" &lt;&lt; endl;
        cout &lt;&lt; "|     |" &lt;&lt; endl;
        cout &lt;&lt;  " -----" &lt;&lt; endl;
        }
        void two()
        {
        cout &lt;&lt; " -----" &lt;&lt; endl;
        cout &lt;&lt; "|    O|" &lt;&lt; endl;
        cout &lt;&lt; "|     |" &lt;&lt; endl;
        cout &lt;&lt; "|O    |" &lt;&lt; endl;
        cout &lt;&lt;  " -----" &lt;&lt; endl;
        }
        void three()
        {
        cout &lt;&lt; " -----" &lt;&lt; endl;
        cout &lt;&lt; "|    O|" &lt;&lt; endl;
        cout &lt;&lt; "|  O  |" &lt;&lt; endl;
        cout &lt;&lt; "|O    |" &lt;&lt; endl;
        cout &lt;&lt;  " -----" &lt;&lt; endl;
        }
        void four()
        {
        cout &lt;&lt; " -----" &lt;&lt; endl;
        cout &lt;&lt; "|O   O|" &lt;&lt; endl;
        cout &lt;&lt; "|     |" &lt;&lt; endl;
        cout &lt;&lt; "|O   O|" &lt;&lt; endl;
        cout &lt;&lt;  " -----" &lt;&lt; endl;
        }
        void five()
        {
        cout &lt;&lt; " -----" &lt;&lt; endl;
        cout &lt;&lt; "|O   O|" &lt;&lt; endl;
        cout &lt;&lt; "|  O  |" &lt;&lt; endl;
        cout &lt;&lt; "|O   O|" &lt;&lt; endl;
        cout &lt;&lt;  " -----" &lt;&lt; endl;
        }
        void six()
        {
        cout &lt;&lt; " -----" &lt;&lt; endl;
        cout &lt;&lt; "|O   O|" &lt;&lt; endl;
        cout &lt;&lt; "|O   O|" &lt;&lt; endl;
        cout &lt;&lt; "|O   O|" &lt;&lt; endl;
        cout &lt;&lt;  " -----" &lt;&lt; endl;
        }
Only call srand() once in an application:

    srand (time(NULL));


Should be just after main() starts.

This does not generate an evenly distributed the random numbers.

    n= rand();
    n = 1 + n % 6;


This is because rand() returns a number from [0,RAND_MAX) or [0,32767) which is not exactly divisible by 6. So you get:

    1:  1/5462        Notice this is one more than the others.
    2:  1/5461
    3:  1/5461
    4:  1/5461
    5:  1/5461
    6:  1/5461


Probably not an issue for a simple app but worth noting. The proper way to do this is:

int dieRoll() // 1-6 evenly distributed.
{
     static int const max = RAND_MAX/6*6;

     int r = rand();
     while(r &gt;= max) { r = rand();}

     return r%6+1;
}


Probably best not to use goto:

xm:
if (ch=='r'){
system("cls"); 
call();  }
else
exit (0);
cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;"Press r to roll again q to quit!";
ch = getch();
goto xm;


Prefer (a standard loop):

while (ch=='r') {
    system("cls"); 
    call();

    cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;"Press r to roll again q to quit!";
    ch = getch();
}


Lets also compress your switch statement:

    switch (n) {
        case 1:   one();break;
        case 2:   two();break;
        case 3: three();break;
        case 4:  four();break;
        case 5:  five();break;
        case 6:   six();break;
        // We know the number will never be anything else
        // so don't need the default.
    }


Don't need to use so many std::endl.

    cout &lt;&lt; " ----- \n"
         &lt;&lt; "|O   O|\n"
         &lt;&lt; "|     |\n"
         &lt;&lt; "|O   O|\n"
         &lt;&lt;  " -----" &lt;&lt; endl;


std::endl is used to flush the output. If you just want a new line use "\n".