Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Luisa Garcia committed Nov 16, 2017
0 parents commit c500f85
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Java101</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
11 changes: 11 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Luisa Garcia

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# java101
Binary file added bin/OperadorAritmetico.class
Binary file not shown.
52 changes: 52 additions & 0 deletions src/OperadorAritmetico.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Compilación: java OperadorAritmetico.class
* Ejecución: javac OperadorAritmetico 10 20
*
* Imprime:
* - Los dos números ingresados
* - Resultado de la división de numero1 entre numero2
* - Resultado de la suma de ambos numeros
* - Resultado de la Resta de numer1 menos numero2
* - Resultado de la Multiplicacion de ambos numeros
* - Resultado del Modulo de numero1 modulo numero2
*
*/
public class OperadorAritmetico {
public static void main(String[] args){
int num1 = Integer.parseInt(args[0]);
int num2 = Integer.parseInt(args[1]);

System.out.println("Número 1: " + num1);
System.out.println("Número 2: " + num2);

System.out.println(Division(num1, num2));
System.out.println(Suma(num1, num2));
System.out.println(Resta(num1, num2));
System.out.println(Multiplicacion(num1, num2));
System.out.println(Modulo(num1, num2));
}
// Escribe tu código {

public static int Division(int num1, int num2){
return num1 / num2;
}

public static int Suma(int num1, int num2){
return num1 + num2;
}

public static int Resta(int num1, int num2){
return num1 - num2;
}

public static int Multiplicacion(int num1, int num2){
return num1 * num2;
}

public static int Modulo(int num1, int num2){
return num1 % num2;
}

//}
}

0 comments on commit c500f85

Please sign in to comment.