From ef83cab891a445763f967c9a722381b78f411b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Nu=C3=B1ez?= <56401021+gururoot@users.noreply.github.com> Date: Thu, 22 Jun 2023 00:49:18 -0300 Subject: [PATCH 1/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 126220d..8abf834 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ +[![Greetings](https://github.com/digitalers/Java-2023/actions/workflows/greetings.yml/badge.svg?branch=main)](https://github.com/digitalers/Java-2023/actions/workflows/greetings.yml) # Java-2023 Repositorio del programa de formación gratuita en desarrollo de software y oficios digitales [Java Full Stack] From 68e4916603f58bf23df3a46616813de5c6318cde Mon Sep 17 00:00:00 2001 From: tomychi Date: Mon, 26 Jun 2023 19:47:17 -0300 Subject: [PATCH 2/3] suma hasta 13 --- README.md | 2 ++ Sumatoria.java | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Sumatoria.java diff --git a/README.md b/README.md index 8abf834..6a5041c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ [![Greetings](https://github.com/digitalers/Java-2023/actions/workflows/greetings.yml/badge.svg?branch=main)](https://github.com/digitalers/Java-2023/actions/workflows/greetings.yml) + # Java-2023 + Repositorio del programa de formación gratuita en desarrollo de software y oficios digitales [Java Full Stack] diff --git a/Sumatoria.java b/Sumatoria.java new file mode 100644 index 0000000..8530357 --- /dev/null +++ b/Sumatoria.java @@ -0,0 +1,30 @@ +public class Sumatoria { + public static void main (String[] args) { + Integer numeros[] = {6,7,5,4,3,1,2,3,5,6,7,9,0,0,1,2,4,1,2,3,5,1,2}; + suman(numeros); + } + + public static void suman(Integer[] array) { + + int sum = 0; + int i = 0; + + while (i < array.length ) { + sum = array[i]; + + for (int f = i+1; f < array.length ; f++) { + sum += array[f]; + + if (sum == 13) { + System.out.printf("Loss elementos entre (%d, %d) suman 13\n", i , f); + break; + } else if (sum > 13) { + break; + } + + } + i++; + } + } + +} \ No newline at end of file From c5d61f0ee9acfc1dd4436a75eddbe57a4436d414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20N=C3=BA=C3=B1ez?= <136550616+joslnunez@users.noreply.github.com> Date: Thu, 29 Jun 2023 03:25:20 +0000 Subject: [PATCH 3/3] 12-suma-de-consecutivos-5 --- .vscode/launch.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..37e0fa4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,21 @@ +{ + // Use IntelliSense para saber los atributos posibles. + // Mantenga el puntero para ver las descripciones de los existentes atributos. + // Para más información, visite: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "java", + "name": "Current File", + "request": "launch", + "mainClass": "${file}" + }, + { + "type": "java", + "name": "Sumatoria", + "request": "launch", + "mainClass": "Sumatoria", + "projectName": "Java-2023_e7000a08" + } + ] +} \ No newline at end of file