/***************************************************************************
 *  Columbia University Introduction to Computer Programming in C COMS 1003
 *  Print Out One Random Number
 *
 *  Copyright (C) 2005 Michael E. Locasto
 *
 *  All rights reserved.
 *
 * $Id: onerand.c,v 1.1 2005/09/15 19:10:31 locasto Exp $
 **************************************************************************/

/* including the stdio library lets us use the printf() function */
#include <stdio.h>
/* including the main standard library lets us use the random() function */
#include <stdlib.h>


/**
 * The point where control flow begins.
 * Check out the man pages for 'rand' and 'random'
 * Try to modify this program to print out a newline after the output
 * of the random number. Also, try to seed the random number generator
 * to get different results on every program invocation.
 * You may find the man page for 'time' useful. 
 */
int main(int argc, char* argv[])
{
   //declare a piece of data (a variable) of type long integer called
   // random number
   long random_number;

   // obtain a random number by calling random()
   random_number = random();

   // print out the random number and a message to the screen
   printf("random number is: %d", random_number);

   // bookkeeping to return from the main() function
   // 'return' is a keyword in C
   return 0;
}
