fork(1) download
  1. package javaapplication13;
  2. import javax.swing.JOptionPane;
  3. @author Administrador
  4.  
  5. public class JavaApplication13 {
  6.  
  7. * @param args the command line arguments
  8.  
  9. public static void main(String[] args) {
  10. String num1,num2,num3;
  11. int n1,n2,n3,con=0,a, mcd=0;
  12. while (con==0){
  13. num1=JOptionPane.showInputDialog(" ingrese primer numero" ) ;
  14. num2=JOptionPane.showInputDialog(" ingrese el segundo numero" ) ;
  15. num3=JOptionPane.showInputDialog(" ingrese tercer numero" ) ;
  16. n1=Integer.parseInt(num1) ;
  17. n2=Integer.parseInt(num2) ;
  18. n3=Integer.parseInt(num3) ;
  19.  
  20. if(n1<2&&n1<n3) {
  21. a=n1; }
  22. else
  23. if (n2<n1&&n2<n3){
  24. a=n2; }
  25. else {
  26. a=n3; }
  27.  
  28.  
  29. for(int x=1; x<=a; x++){
  30. if(n1 % x == 0 & n2 % x == 0 & n3 % x == 0){
  31. mcd=x;
  32. }
  33. }
  34. JOptionPane.showMessageDialog(null,"m.c.d es "+mcd) ;
  35. if(mcd>10){
  36. con=1;
  37. }
  38. }
  39. }
  40. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:3: error: class, interface, or enum expected
@author Administrador
        ^
Main.java:7: error: illegal start of type
* @param args the command line arguments
^
Main.java:7: error: illegal start of type
* @param args the command line arguments
  ^
Main.java:7: error: ';' expected
* @param args the command line arguments
        ^
Main.java:7: error: ';' expected
* @param args the command line arguments
                         ^
Main.java:7: error: ';' expected
* @param args the command line arguments
                                        ^
6 errors
stdout
Standard output is empty