From c4f3413cccc32cfd7e0099b06946a6d08b14f4f8 Mon Sep 17 00:00:00 2001 From: Juan Cristaldo Date: Tue, 8 Sep 2020 15:43:15 -0400 Subject: [PATCH] Ejercicio 1 Realizado --- JavaApplication/nbproject/project.properties | 2 +- JavaApplication/src/javaapplication/Ejercicio01.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++ JavaApplication/src/javaapplication/Ejercicio02.java | 14 ++++++++++++++ JavaApplication/src/javaapplication/JavaApplication.java | 21 --------------------- 4 files changed, 61 insertions(+), 22 deletions(-) create mode 100644 JavaApplication/src/javaapplication/Ejercicio01.java create mode 100644 JavaApplication/src/javaapplication/Ejercicio02.java delete mode 100644 JavaApplication/src/javaapplication/JavaApplication.java 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/Ejercicio02.java b/JavaApplication/src/javaapplication/Ejercicio02.java new file mode 100644 index 0000000..8c6d873 --- /dev/null +++ b/JavaApplication/src/javaapplication/Ejercicio02.java @@ -0,0 +1,14 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package javaapplication; + +/** + * + * @author Juan Cristaldo + */ +public class Ejercicio02 { + +} diff --git a/JavaApplication/src/javaapplication/JavaApplication.java b/JavaApplication/src/javaapplication/JavaApplication.java deleted file mode 100644 index 5f60215..0000000 --- a/JavaApplication/src/javaapplication/JavaApplication.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -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"); - } - -} -- libgit2 0.26.0