/**
 * Playing with random numbers.
 *
 * @author Terry Sergeant
 * @version In Class Demo
 *
 * Do the following steps:
 * 1. Run the program 4 times and write the output of each 
 *    execution.  Based on the results, how would you describe the
 *    behavior of line A?
 *
 * 2. Add a for loop to this program so that lines A and B will 
 *    happen 20 times.  Compile and test.
 * 
 * 3. Modify line A so that the value returned by Math.random() is 
 *    multiplied by 8.  How does that change the output?
 * 
 * 4. One way to "chop off" the decimal places in a double variable
 *    is to "type cast" the double variable to be an integer.  Line C
 *    is an example of this.  Add line C between lines A and B and
 *    modify line B so that is prints anothernumber instead of number.
 *    What does the output look like now?  How would you describe the
 *    behavior of the program?
*/

import java.util.Scanner;

public class PlayWithRandom
{
	public static void main(String [] args)
	{
		Scanner cin= new Scanner(System.in);
		int anothernumber;
		double number;

		number= Math.random();  // line A
		System.out.println("The number is: "+number);  // line B 



		// anothernumber= (int) number;  // line C
	}

}

