diff --git a/JavaApplication/nbproject/project.properties b/JavaApplication/nbproject/project.properties index f202310..62091c8 100644 --- a/JavaApplication/nbproject/project.properties +++ b/JavaApplication/nbproject/project.properties @@ -54,7 +54,7 @@ javadoc.splitindex=true javadoc.use=true javadoc.version=false javadoc.windowtitle= -main.class=javaapplication.JavaApplication +main.class=javaapplication.Ejercicio01 manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF mkdist.disabled=false diff --git a/JavaApplication/src/javaapplication/Ejercicio01.java b/JavaApplication/src/javaapplication/Ejercicio01.java new file mode 100644 index 0000000..4f218e6 --- /dev/null +++ b/JavaApplication/src/javaapplication/Ejercicio01.java @@ -0,0 +1,46 @@ +/* + * 1. Declara dos variables numéricas (con el valor que desees), muestra por consola la + * suma, resta, multiplicación, división y módulo (resto de la división). + */ +package javaapplication; + +import java.util.Scanner; + +/** + * + * @author Juan Cristaldo + */ +public class Ejercicio01 { + + + public static void main(String[] args) { + + Scanner entrada = new Scanner(System.in); // Práctica de mi facultad xd + + System.out.println("***Operaciones Algebraicas***"); + System.out.println("Ingrese el primer número"); + int nro1 = entrada.nextInt(); + + System.out.println("Ingrese el segundo número"); + int nro2 = entrada.nextInt(); + +// int nro1 = 10; +// int nro2 = 4; + + int suma = nro1 + nro2; + System.out.println("La suma es: " + suma); + + int resta = nro1 - nro2; + System.out.println("La resta es: " + resta); + + int multiplicacion = nro1 * nro2; + System.out.println("La multiplicación es: " + multiplicacion); + + int division = nro1 / nro2; + System.out.println("La división es: " + division); + + int restodedivision = nro1 % nro2; + System.out.println("El resto de la división es: " + restodedivision); + + } +} \ No newline at end of file diff --git a/JavaApplication/src/javaapplication/JavaApplication.java b/JavaApplication/src/javaapplication/Ejercicio02.java similarity index 73% rename from JavaApplication/src/javaapplication/JavaApplication.java rename to JavaApplication/src/javaapplication/Ejercicio02.java index 5f60215..8c6d873 100644 --- a/JavaApplication/src/javaapplication/JavaApplication.java +++ b/JavaApplication/src/javaapplication/Ejercicio02.java @@ -9,13 +9,6 @@ package javaapplication; * * @author Juan Cristaldo */ -public class JavaApplication { - - /** - * @param args the command line arguments - */ - public static void main(String[] args) { - System.err.println("Hello World"); - } +public class Ejercicio02 { }