From 6c66ab95af1aa9edc979d02ec9bede22167d072a Mon Sep 17 00:00:00 2001 From: roshka Date: Thu, 11 Oct 2018 11:19:11 -0300 Subject: [PATCH] Primera tarea de java --- #README.md# | 3 +++ Java-e001/build.xml | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Java-e001/build/classes/.netbeans_automatic_build | 0 Java-e001/build/classes/.netbeans_update_resources | 0 Java-e001/build/classes/ejercicios/Ejercicio01.class | Bin 0 -> 1074 bytes Java-e001/build/classes/ejercicios/Ejercicio02.class | Bin 0 -> 1079 bytes Java-e001/build/classes/ejercicios/Ejercicio03.class | Bin 0 -> 776 bytes Java-e001/build/classes/ejercicios/Ejercicio04.class | Bin 0 -> 982 bytes Java-e001/build/classes/ejercicios/Ejercicio05.class | Bin 0 -> 910 bytes Java-e001/build/classes/ejercicios/Ejercicio06.class | Bin 0 -> 1098 bytes Java-e001/build/classes/ejercicios/Ejercicio07.class | Bin 0 -> 905 bytes Java-e001/build/classes/ejercicios/Ejercicio08.class | Bin 0 -> 1044 bytes Java-e001/build/classes/ejercicios/Ejercicio09.class | Bin 0 -> 1140 bytes Java-e001/build/classes/ejercicios/Ejercicio10.class | Bin 0 -> 1780 bytes Java-e001/manifest.mf | 3 +++ Java-e001/nbproject/build-impl.xml | 1450 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Java-e001/nbproject/genfiles.properties | 8 ++++++++ Java-e001/nbproject/private/private.properties | 2 ++ Java-e001/nbproject/private/private.xml | 10 ++++++++++ Java-e001/nbproject/project.properties | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Java-e001/nbproject/project.xml | 16 ++++++++++++++++ Java-e001/src/ejercicios/Ejercicio01.java | 35 +++++++++++++++++++++++++++++++++++ Java-e001/src/ejercicios/Ejercicio02.java | 34 ++++++++++++++++++++++++++++++++++ Java-e001/src/ejercicios/Ejercicio03.java | 18 ++++++++++++++++++ Java-e001/src/ejercicios/Ejercicio04.java | 24 ++++++++++++++++++++++++ Java-e001/src/ejercicios/Ejercicio05.java | 26 ++++++++++++++++++++++++++ Java-e001/src/ejercicios/Ejercicio06.java | 25 +++++++++++++++++++++++++ Java-e001/src/ejercicios/Ejercicio07.java | 22 ++++++++++++++++++++++ Java-e001/src/ejercicios/Ejercicio08.java | 24 ++++++++++++++++++++++++ Java-e001/src/ejercicios/Ejercicio09.java | 32 ++++++++++++++++++++++++++++++++ Java-e001/src/ejercicios/Ejercicio10.java | 40 ++++++++++++++++++++++++++++++++++++++++ README.md | 0 32 files changed, 1919 insertions(+) create mode 100644 #README.md# create mode 100644 Java-e001/build.xml create mode 100644 Java-e001/build/classes/.netbeans_automatic_build create mode 100644 Java-e001/build/classes/.netbeans_update_resources create mode 100644 Java-e001/build/classes/ejercicios/Ejercicio01.class create mode 100644 Java-e001/build/classes/ejercicios/Ejercicio02.class create mode 100644 Java-e001/build/classes/ejercicios/Ejercicio03.class create mode 100644 Java-e001/build/classes/ejercicios/Ejercicio04.class create mode 100644 Java-e001/build/classes/ejercicios/Ejercicio05.class create mode 100644 Java-e001/build/classes/ejercicios/Ejercicio06.class create mode 100644 Java-e001/build/classes/ejercicios/Ejercicio07.class create mode 100644 Java-e001/build/classes/ejercicios/Ejercicio08.class create mode 100644 Java-e001/build/classes/ejercicios/Ejercicio09.class create mode 100644 Java-e001/build/classes/ejercicios/Ejercicio10.class create mode 100644 Java-e001/manifest.mf create mode 100644 Java-e001/nbproject/build-impl.xml create mode 100644 Java-e001/nbproject/genfiles.properties create mode 100644 Java-e001/nbproject/private/private.properties create mode 100644 Java-e001/nbproject/private/private.xml create mode 100644 Java-e001/nbproject/project.properties create mode 100644 Java-e001/nbproject/project.xml create mode 100644 Java-e001/src/ejercicios/Ejercicio01.java create mode 100644 Java-e001/src/ejercicios/Ejercicio02.java create mode 100644 Java-e001/src/ejercicios/Ejercicio03.java create mode 100644 Java-e001/src/ejercicios/Ejercicio04.java create mode 100644 Java-e001/src/ejercicios/Ejercicio05.java create mode 100644 Java-e001/src/ejercicios/Ejercicio06.java create mode 100644 Java-e001/src/ejercicios/Ejercicio07.java create mode 100644 Java-e001/src/ejercicios/Ejercicio08.java create mode 100644 Java-e001/src/ejercicios/Ejercicio09.java create mode 100644 Java-e001/src/ejercicios/Ejercicio10.java create mode 100644 README.md diff --git a/#README.md# b/#README.md# new file mode 100644 index 0000000..ef1c4e3 --- /dev/null +++ b/#README.md# @@ -0,0 +1,3 @@ +#Instruccion +La recomendacio es utilizar netBeans en la carpeta src, luego en la carpeta ejercicios estan todas las tareas. +Ahi seleccionan la tarea a evaluar. \ No newline at end of file diff --git a/Java-e001/build.xml b/Java-e001/build.xml new file mode 100644 index 0000000..4cbc7cf --- /dev/null +++ b/Java-e001/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Java-e001. + + + diff --git a/Java-e001/build/classes/.netbeans_automatic_build b/Java-e001/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Java-e001/build/classes/.netbeans_automatic_build diff --git a/Java-e001/build/classes/.netbeans_update_resources b/Java-e001/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Java-e001/build/classes/.netbeans_update_resources diff --git a/Java-e001/build/classes/ejercicios/Ejercicio01.class b/Java-e001/build/classes/ejercicios/Ejercicio01.class new file mode 100644 index 0000000..9ebab9e Binary files /dev/null and b/Java-e001/build/classes/ejercicios/Ejercicio01.class differ diff --git a/Java-e001/build/classes/ejercicios/Ejercicio02.class b/Java-e001/build/classes/ejercicios/Ejercicio02.class new file mode 100644 index 0000000..48c6ee5 Binary files /dev/null and b/Java-e001/build/classes/ejercicios/Ejercicio02.class differ diff --git a/Java-e001/build/classes/ejercicios/Ejercicio03.class b/Java-e001/build/classes/ejercicios/Ejercicio03.class new file mode 100644 index 0000000..03da426 Binary files /dev/null and b/Java-e001/build/classes/ejercicios/Ejercicio03.class differ diff --git a/Java-e001/build/classes/ejercicios/Ejercicio04.class b/Java-e001/build/classes/ejercicios/Ejercicio04.class new file mode 100644 index 0000000..822f98b Binary files /dev/null and b/Java-e001/build/classes/ejercicios/Ejercicio04.class differ diff --git a/Java-e001/build/classes/ejercicios/Ejercicio05.class b/Java-e001/build/classes/ejercicios/Ejercicio05.class new file mode 100644 index 0000000..a4426de Binary files /dev/null and b/Java-e001/build/classes/ejercicios/Ejercicio05.class differ diff --git a/Java-e001/build/classes/ejercicios/Ejercicio06.class b/Java-e001/build/classes/ejercicios/Ejercicio06.class new file mode 100644 index 0000000..6fce1cf Binary files /dev/null and b/Java-e001/build/classes/ejercicios/Ejercicio06.class differ diff --git a/Java-e001/build/classes/ejercicios/Ejercicio07.class b/Java-e001/build/classes/ejercicios/Ejercicio07.class new file mode 100644 index 0000000..734c5c0 Binary files /dev/null and b/Java-e001/build/classes/ejercicios/Ejercicio07.class differ diff --git a/Java-e001/build/classes/ejercicios/Ejercicio08.class b/Java-e001/build/classes/ejercicios/Ejercicio08.class new file mode 100644 index 0000000..a841b08 Binary files /dev/null and b/Java-e001/build/classes/ejercicios/Ejercicio08.class differ diff --git a/Java-e001/build/classes/ejercicios/Ejercicio09.class b/Java-e001/build/classes/ejercicios/Ejercicio09.class new file mode 100644 index 0000000..f2c1483 Binary files /dev/null and b/Java-e001/build/classes/ejercicios/Ejercicio09.class differ diff --git a/Java-e001/build/classes/ejercicios/Ejercicio10.class b/Java-e001/build/classes/ejercicios/Ejercicio10.class new file mode 100644 index 0000000..a2224d2 Binary files /dev/null and b/Java-e001/build/classes/ejercicios/Ejercicio10.class differ diff --git a/Java-e001/manifest.mf b/Java-e001/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Java-e001/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Java-e001/nbproject/build-impl.xml b/Java-e001/nbproject/build-impl.xml new file mode 100644 index 0000000..75267ec --- /dev/null +++ b/Java-e001/nbproject/build-impl.xml @@ -0,0 +1,1450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set platform.home + Must set platform.bootcp + Must set platform.java + Must set platform.javac + + The J2SE Platform is not correctly set up. + Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files. + Either open the project in the IDE and setup the Platform with the same name or add it manually. + For example like this: + ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.${platform.active}.home" in a .properties file) + or ant -Dplatforms.${platform.active}.home=<path_to_JDK_home> jar (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + ${platform.java} -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Java-e001/nbproject/genfiles.properties b/Java-e001/nbproject/genfiles.properties new file mode 100644 index 0000000..d4c60ff --- /dev/null +++ b/Java-e001/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=2d68c016 +build.xml.script.CRC32=31bfe660 +build.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=2d68c016 +nbproject/build-impl.xml.script.CRC32=6c48c9fd +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/Java-e001/nbproject/private/private.properties b/Java-e001/nbproject/private/private.properties new file mode 100644 index 0000000..fab0b3a --- /dev/null +++ b/Java-e001/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=/home/roshka/.netbeans/8.2/build.properties diff --git a/Java-e001/nbproject/private/private.xml b/Java-e001/nbproject/private/private.xml new file mode 100644 index 0000000..c88cd57 --- /dev/null +++ b/Java-e001/nbproject/private/private.xml @@ -0,0 +1,10 @@ + + + + + + file:/home/roshka/primera-prueba/Java-e001/src/ejercicios/Ejercicio09.java + file:/home/roshka/primera-prueba/Java-e001/src/ejercicios/Ejercicio10.java + + + diff --git a/Java-e001/nbproject/project.properties b/Java-e001/nbproject/project.properties new file mode 100644 index 0000000..3c3f78d --- /dev/null +++ b/Java-e001/nbproject/project.properties @@ -0,0 +1,74 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Java-e001.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=ejercicios.Ejercicio01 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=JDK_1.7 +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Java-e001/nbproject/project.xml b/Java-e001/nbproject/project.xml new file mode 100644 index 0000000..7fcaf4a --- /dev/null +++ b/Java-e001/nbproject/project.xml @@ -0,0 +1,16 @@ + + + org.netbeans.modules.java.j2seproject + + + Java-e001 + + + + + + + + + + diff --git a/Java-e001/src/ejercicios/Ejercicio01.java b/Java-e001/src/ejercicios/Ejercicio01.java new file mode 100644 index 0000000..bd1a1ee --- /dev/null +++ b/Java-e001/src/ejercicios/Ejercicio01.java @@ -0,0 +1,35 @@ +/* + * 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 ejercicios; + +/** + * + * @author roshka + */ +public class Ejercicio01 { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + int a = 10; + int b = 7; + int resultado; + + resultado = a+b; + System.out.println("La suma es: "+resultado); + resultado = a-b; + System.out.println("La resta es: "+resultado); + resultado = a*b; + System.out.println("La multiplicacion es: "+resultado); + resultado = a/b; + System.out.println("La divison es: "+resultado); + resultado = a%b; + System.out.println("El modulo es: "+resultado); + } + +} diff --git a/Java-e001/src/ejercicios/Ejercicio02.java b/Java-e001/src/ejercicios/Ejercicio02.java new file mode 100644 index 0000000..58843d9 --- /dev/null +++ b/Java-e001/src/ejercicios/Ejercicio02.java @@ -0,0 +1,34 @@ +/* + * 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 ejercicios; + +/** + * + * @author roshka + */ +public class Ejercicio02 { + + /** + * + * @param args + */ + public static void main(String[] args) { + int a = 2; + int b; + for (int i = 1; i < 4; i++) { + b = i; + if (a < b) { + System.out.println("a es menor que b: "+a+"<"+b); + } + if (a == b) { + System.out.println("a es igual que b: "+a+"="+b); + } + if (a > b) { + System.out.println("a es mayor que b: "+a+">"+b); + } + } + } +} diff --git a/Java-e001/src/ejercicios/Ejercicio03.java b/Java-e001/src/ejercicios/Ejercicio03.java new file mode 100644 index 0000000..a268c9c --- /dev/null +++ b/Java-e001/src/ejercicios/Ejercicio03.java @@ -0,0 +1,18 @@ +/* + * 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 ejercicios; + +/** + * + * @author roshka + */ +public class Ejercicio03 { + public static void main(String[] args) { + // TODO code application logic here + String f = "Fernando"; + System.out.println("Bienvenido "+f); + } +} diff --git a/Java-e001/src/ejercicios/Ejercicio04.java b/Java-e001/src/ejercicios/Ejercicio04.java new file mode 100644 index 0000000..8472c83 --- /dev/null +++ b/Java-e001/src/ejercicios/Ejercicio04.java @@ -0,0 +1,24 @@ +/* + * 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 ejercicios; + +import java.util.Scanner; + +/** + * + * @author roshka + */ +public class Ejercicio04 { + public static void main(String[] args) { + // TODO code application logic here + String nombre; + Scanner scn = new Scanner(System.in); + System.out.println("Introduzca su nombre: "); + nombre = scn.nextLine(); + System.out.println("Bienvenido "+nombre); + } + +} diff --git a/Java-e001/src/ejercicios/Ejercicio05.java b/Java-e001/src/ejercicios/Ejercicio05.java new file mode 100644 index 0000000..c8cfa67 --- /dev/null +++ b/Java-e001/src/ejercicios/Ejercicio05.java @@ -0,0 +1,26 @@ +/* + * 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 ejercicios; + +import java.util.Scanner; + +/** + * + * @author roshka + */ +public class Ejercicio05 { + public static void main(String[] args){ + int valor; + Scanner scn = new Scanner(System.in); + System.out.println("Ingrese su valor"); + valor = scn.nextInt(); + if (valor%2 == 0 ) { + System.out.println("El numero es divisible por 2"); + }else{ + System.out.println("El numero no es divible por 2"); + } + } +} diff --git a/Java-e001/src/ejercicios/Ejercicio06.java b/Java-e001/src/ejercicios/Ejercicio06.java new file mode 100644 index 0000000..1e64114 --- /dev/null +++ b/Java-e001/src/ejercicios/Ejercicio06.java @@ -0,0 +1,25 @@ +/* + * 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 ejercicios; + +import java.util.Scanner; + +/** + * + * @author roshka + */ +public class Ejercicio06 { + public static void main(String[] args){ + float precio; + float iva; + Scanner scn = new Scanner(System.in); + System.out.println("Ingrese su precio"); + precio = scn.nextFloat(); + iva = (precio*10)/100; + precio = precio + iva; + System.out.println("El precio de su producto con IVA incluido: "+precio+"$"); + } +} diff --git a/Java-e001/src/ejercicios/Ejercicio07.java b/Java-e001/src/ejercicios/Ejercicio07.java new file mode 100644 index 0000000..4088743 --- /dev/null +++ b/Java-e001/src/ejercicios/Ejercicio07.java @@ -0,0 +1,22 @@ +/* + * 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 ejercicios; + +/** + * + * @author roshka + */ +public class Ejercicio07 { + public static void main(String[] args){ + for (int i = 0; i < 101; i++) { + if (i%2==0) { + System.out.println("Divisible por 2: "+i); + }else{ + System.out.println("Divisible por 3: "+i); + } + } + } +} diff --git a/Java-e001/src/ejercicios/Ejercicio08.java b/Java-e001/src/ejercicios/Ejercicio08.java new file mode 100644 index 0000000..a912c69 --- /dev/null +++ b/Java-e001/src/ejercicios/Ejercicio08.java @@ -0,0 +1,24 @@ +/* + * 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 ejercicios; + +import java.util.Scanner; + +/** + * + * @author roshka + */ +public class Ejercicio08 { + public static void main(String[] args){ + int valor; + Scanner scr = new Scanner(System.in); + do { + System.out.println("Ingrese su valor: "); + valor = scr.nextInt(); + } while (valor <= 0); + System.out.println("Su valor: "+valor); + } +} diff --git a/Java-e001/src/ejercicios/Ejercicio09.java b/Java-e001/src/ejercicios/Ejercicio09.java new file mode 100644 index 0000000..12303c1 --- /dev/null +++ b/Java-e001/src/ejercicios/Ejercicio09.java @@ -0,0 +1,32 @@ +/* + * 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 ejercicios; + +import java.util.Scanner; + +/** + * + * @author roshka + */ +public class Ejercicio09 { + public static void main(String[] args){ + String pass = "holaxd"; + String pass2; + Scanner scr = new Scanner(System.in); + + for (int i = 1; i < 4; i++){ + System.out.println("Ingrese contrasena: "); + pass2 = scr.nextLine(); + if (pass.equals(pass2)) { + System.out.println("Correcto"); + return; + }else{ + System.out.println("Fallaste jaja xd"); + } + } + System.out.println("Hule amigo"); + } +} diff --git a/Java-e001/src/ejercicios/Ejercicio10.java b/Java-e001/src/ejercicios/Ejercicio10.java new file mode 100644 index 0000000..9692c86 --- /dev/null +++ b/Java-e001/src/ejercicios/Ejercicio10.java @@ -0,0 +1,40 @@ +/* + * 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 ejercicios; + +import java.util.Scanner; + +/** + * + * @author roshka + */ +public class Ejercicio10 { + public static void main(String[] args){ + String dia; + String diaStr = ""; + Scanner scr = new Scanner(System.in); + System.out.println("Ingrese dia: "); + dia = scr.nextLine(); + switch(dia){ + case "Lunes": case "lunes" : diaStr = "Laboral"; + break; + case "Martes" : case "martes": diaStr = "Laboral"; + break; + case "Miercoles" : case "miercoles": diaStr = "Laboral"; + break; + case "Jueves" : case "jueves" : diaStr = "Laboral"; + break; + case "Viernes" : case "viernes":diaStr = "Laboral"; + break; + case "Sabado" : case "sabado":diaStr = "No Laboral"; + break; + case "Domingo" : case "domingo":diaStr = "No Laboral"; + break; + default: diaStr = "Dia no valido"; + } + System.out.println(diaStr); + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/README.md -- libgit2 0.26.0