1#include <time.h> // So we can use time() function
2#include <iostream> // To output results to console
3
4int main() // Main function required in all C++ programs and first function to be called
5{
6 srand( time(NULL) ); //Randomize seed initialization
7 int randNum = rand() % 2; // Generate a random number between 0 and 1
8
9 std::cout << randNum; // Output the results to console
10 return 0; //Generate an "EXIT SUCCESS" return code
11}