// The "Q5" class.
import java.awt.*;
import java.io.*;
import hsa.Console;

public class Q5
{
    static Console c;           // The output console

    public static void main (String[] args)
    {
	c = new Console ();

	try
	{

	    FileWriter fw = new FileWriter ("OUT5.txt");
	    PrintWriter pr = new PrintWriter (fw);

	    for (int i = 0 ; i < 5 ; i++)

		{
		    pr.println ((int) (5 * Math.random ()));
		    c.println ((int) (5 * Math.random ()));

		}
	    pr.close ();

	}
	catch (IOException e)
	{
	    c.println ("IOException");
	}
	catch (NumberFormatException e)
	{
	    c.println ("NumberFormatException");
	}

	// Place your program here.  'c' is the output console
    } // main method
} // Q5 class

