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. // your code goes here
  13. public class MinMax1 {
  14. public static void main(String[] args) {
  15. Scanner sc = new Scanner(System.in);
  16. int n1, n2, n3;
  17.  
  18. System.out.print("Entre com o primeiro inteiro: ");
  19. n1 = sc.nextInt();
  20. System.out.print("Entre com o segundo inteiro: ");
  21. n2 = sc.nextInt();
  22. System.out.print("Entre com o terceiro inteiro: ");
  23. n3 = sc.nextInt();
  24. if (n1 > n2) {
  25. if (n1 > n3) {
  26. if (n2 < n3) {
  27. System.out.println("O menor numero eh: " + n2);
  28. } else {
  29. System.out.println("O menor numero eh: " + n3);
  30. }
  31. System.out.println("O maior numero eh: " + n1);
  32. } else {
  33. if (n1 < n2) {
  34. System.out.println("O menor numero eh: " + n1);
  35. } else {
  36. System.out.println("O menor numero eh: " + n2);
  37. }
  38. System.out.println("O maior numero eh: " + n3);
  39. }
  40. } else {
  41. if (n2 > n3) {
  42. if (n1 < n3) {
  43. System.out.println("O menor numero eh: " + n1);
  44. } else {
  45. System.out.println("O menor numero eh: " + n3);
  46. }
  47. System.out.println("O maior numero eh: " + n2);
  48. } else {
  49. if (n1 < n2) {
  50. System.out.println("O menor numero eh: " + n1);
  51. } else {
  52. System.out.println("O menor numero eh: " + n2);
  53. }
  54. System.out.println("O maior numero eh: " + n3);
  55. }
  56. }
  57. }
  58. }
  59. }
  60. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:13: error: illegal start of expression
		public class MinMax1 {
		^
1 error
stdout
Standard output is empty