Skip to content

Instantly share code, notes, and snippets.

@jkcgs
Last active December 28, 2015 17:59
Show Gist options
  • Save jkcgs/7539621 to your computer and use it in GitHub Desktop.
Save jkcgs/7539621 to your computer and use it in GitHub Desktop.
Un código raro que me mandó la Yerlin
public class Yerlin1 {
public static void main(String[] args) {
int num1 = Integer.parseInt(JOptionPane.showInputDialog(null, "ingrese lado 1"));
int num2 = Integer.parseInt(JOptionPane.showInputDialog(null, "ingrese lado 2"));
int num3 = Integer.parseInt(JOptionPane.showInputDialog(null, "ingrese lado 3"));
System.out.println ("el perimetro es: "+ calcularperimetro(num1, num2, num3));
}
public static int calcularperimetro(int l1, int l2, int l3 ){
return l1 + l2 + l3;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment