/******************************************************************************
*  Example of javadoc comments & documentation
*  
*  @author Sam Sultan
*  @version 1.0                          
******************************************************************************/
public class pgm1 
{
/**
* main method which is automatically called by the JVM
* @param  args - String[] a String array
* @return none - No return value
* @throws none - Does not throw any exceptions  
*/

    public static void main(String[] args) 
    {
        int total = 23951;
        int num = 12;
        float avg  = total / num;                       // integer division
        float avg2 = (float) total / num;               // casting to a (float) 

        System.out.println(total + " divided by " + num);
        System.out.println("without casting: " + avg);
        System.out.println("with casting...: " + avg2);

        double rand = Math.random();
        int dice = (int) (rand * 6 + 1);                //casting to an integer

        System.out.println();
        System.out.println("The random number is: " + rand);
        System.out.println("The dice is showing.: " + dice);
    }
}