fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. public static void main(String args[])
  13. {
  14. int i,j=0,max,value;
  15. int a[]=new int[10];
  16. max=value=0;
  17. Console con = System.console();
  18.  
  19. System.out.println("Enter values");
  20. for(i=0;i<a.length;i++)
  21. a[i]= Integer.parseInt(con.readLine());
  22.  
  23. max=a[0];
  24. for(i=0;i<a.length;i++)
  25. if(a[i]>max)
  26. max=a[i];
  27. value=max;
  28.  
  29. System.out.println();
  30. System.out.println("The Vertical Histogram is as follows");
  31.  
  32. for(i=0;i<value;i++)
  33. {
  34. for(j=0;j < a.length ;j++)
  35. if(a[j]<max)
  36. System.out.print(" ");
  37. else
  38. System.out.print("* ");
  39. max--;
  40. System.out.println();
  41. }// your code goes here
  42. }
  43. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:12: error: illegal start of expression
		 public static void main(String args[])
		 ^
Main.java:12: error: illegal start of expression
		 public static void main(String args[])
		        ^
Main.java:12: error: ';' expected
		 public static void main(String args[])
		              ^
Main.java:12: error: ')' expected
		 public static void main(String args[])
		                               ^
Main.java:12: error: illegal start of expression
		 public static void main(String args[])
		                                    ^
Main.java:12: error: ';' expected
		 public static void main(String args[])
		                                     ^
Main.java:12: error: illegal start of expression
		 public static void main(String args[])
		                                      ^
Main.java:12: error: ';' expected
		 public static void main(String args[])
		                                       ^
8 errors
stdout
Standard output is empty