fork(1) 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. double x;
  13. x=20;
  14. System.out.println("valor de x "+x);
  15. if(x>0)&&(x<10);{
  16. System.out.println("numero de 1 cifra");}
  17. else{
  18. if(x>=10)&&(x<100);{
  19. System.out.println("numero de 2 cifras");}
  20. else{
  21. if(x>=100)&&(x<1000);{
  22. System.out.println("numero de 3 cifras");}
  23. else{
  24. (x>=1000)&&(x<10000);{
  25. System.out.println("numero de 4 cifras");}
  26. }
  27. }
  28. }
  29. // your code goes here
  30. }
  31. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:15: error: illegal start of expression
	if(x>0)&&(x<10);{
	       ^
Main.java:18: error: illegal start of expression
	if(x>=10)&&(x<100);{
	         ^
Main.java:21: error: illegal start of expression
	if(x>=100)&&(x<1000);{
	          ^
Main.java:24: error: not a statement
	(x>=1000)&&(x<10000);{
	         ^
Main.java:23: error: 'else' without 'if'
	else{
	^
Main.java:20: error: 'else' without 'if'
	else{
	^
Main.java:17: error: 'else' without 'if'
	else{
	^
7 errors
stdout
Standard output is empty