Random

Here a program a made back in the day and was just looking at it and was wondering if there a way to make this random number program to be completely random.... Is it even possible to make something completely random.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <string>

using namespace std;

int main()
{

	srand( time ( NULL ) );

	const string Prompt( "\t\tGuessing Game\n\n" );
	int GuessNumber;
	int InvisableNumber = ( rand( ) + time(0) ) % 100  +1;
	int count = 0;

	cout << Prompt;

	cout << "Guess a number between 1 - 100<0 to exit>";

	do {

		cout << "\n>";
		cin >> GuessNumber;


		if( GuessNumber > InvisableNumber ) {

			cout << "\nTo High!\n";

		}

        if( GuessNumber < InvisableNumber ) {

			cout << "\nTo Low!\n";

		}

			count++;

		if( GuessNumber == InvisableNumber ) {

			cout << "\nThats right!\n";
			cout << "It took you " << count << " Try's " << endl << endl;

		}

	} while( GuessNumber != InvisableNumber );

	return( 0 );
}

It's literally impossible to create a random number. Algorithms can be "more" random but they are always pseudorandom. I'm sure you could check Wikipedia for the details.
Thanks for the information
Topic archived. No new replies allowed.