import javax.swing.*;

public class H7_Dia35
{
	public static void main (String args[])
	{
		int aantalElementen;
		String output = "Index\tWaarde\tHistogram\n";
		
		aantalElementen = Integer.parseInt(JOptionPane.showInputDialog("Geef het aantal elementen"));
				
		int array[] = new int[aantalElementen];
		
		for (int i = 0; i < array.length; i++)
		{
			String histogram = "";
			array[i] = Integer.parseInt(JOptionPane.showInputDialog("Geef het " + i + "de element"));
			
			for (int j = 0; j < array[i]; j++)
			{
				histogram += "*";
			}
			
			output += i + "\t" + array[i] + "\t" + histogram + "\n";
		}

		JTextArea outputArea = new JTextArea();
		
		outputArea.setText(output);
		
		JOptionPane.showMessageDialog(null, outputArea);

	}
}