Created
February 24, 2023 22:12
-
-
Save Filmaluco/55ff3030943f3b72878fb9e2717fd1ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SomaParInteiros | |
{ | |
public static void main(String args[]) | |
{ | |
int i1, i2; | |
System.out.println(); | |
if(args.length != 2){ | |
System.out.println("Devem ser indicados 2 parâmetros inteiros!"); | |
return; | |
} | |
i1 = Integer.parseInt(args[0]); | |
i2 = Integer.parseInt(args[1]); | |
ParInteiros p = new ParInteiros(i1, i2); | |
System.out.println(p); | |
System.out.println(i1 + " + " + i2 + " = " + p.getSoma()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment