UNIVERSIDAD NACIONAL DE CHIMBORAZO
FACULTAD DE CIENCIAS DE LA EDUCACION HUMANAS Y TECNOLOGIAS
NOMBRE: GEOVANNY YUNGAN
PRACTICA 4
EJERCICIO 1
Calcule el máximo común divisor entre dos números , mediante el algoritmo de Euclides.
El a lgor itmo de Euclides es un procedimiento para calcular el m.c.d. de dos números. Los
pasos son:
a. Se divide el número mayor entre el menor.
b. Si:
. La división es exacta, el divisor es el m.c.d.
. La división no es exacta, dividimos el div isor entre el residuo obtenido y se
continúa de esta forma hasta obtener una división exacta, siendo el último div isor
el m.c.d.
m. c. d. (72, 16)
DESARROLLO
//GEOVANNY YUNGAN
import java.util.Scanner;
class mcd {
public static void main(String args [])
{
Scanner datos=new Scanner(System.in);
int r=0,a=0,b=0;
System.out.println("ingrese el primer numero ");
a=datos.nextInt();
System.out.println("ingrese el segundo numero ");
b=datos.nextInt();
while (b>0)
{
r=a%b;
a=b;
b=r;
}
System.out.println("****El mcm***" +a);
}
}
EJECUCIÓN
EJERCICIO 2
Realice la siguiente serie
//GEOVANNY YUNGAN
import java.util.Scanner;
class series {
public static void main(String[] args) {
Scanner nu=new Scanner(System.in);
double s,c=0,a=0,k=0,serie;
System.out.println("Ingrese un numero de serie:");
s=nu.nextDouble();
c=1;
while(c<=s)
{
if(c%2==0)
{
serie=c;
c=c*(-1);
System.out.println(+c);
c=serie+1;
}
else
{
System.out.println("la serie es:"+c);
c=c+1;
}
}
}
EJECUCIÓN

Más contenido relacionado

DOCX
Ejercicios 4
DOCX
Ejercicios 4
DOCX
Ejercicios 4
DOCX
Ejercicios 4
DOCX
Guia 3 séptimo básico
PPTX
Seminario 8 chi cuadrado
DOC
Ejercicios 2 electronica digital
Ejercicios 4
Ejercicios 4
Ejercicios 4
Ejercicios 4
Guia 3 séptimo básico
Seminario 8 chi cuadrado
Ejercicios 2 electronica digital

La actualidad más candente (9)

PPTX
Presentacion de matematica
PPTX
Diagrama de flujo
PPTX
Diagrama de flujo (programacion)
DOCX
Actividad de integrales
DOCX
Funcion lineal para practicar
DOCX
problemas de razonamiento
PPTX
Diagramas de flujo
DOCX
Funcionlinealparapracticar 151024020323-lva1-app6892conrespuestas-15102721035...
PDF
Estadistica utp
Presentacion de matematica
Diagrama de flujo
Diagrama de flujo (programacion)
Actividad de integrales
Funcion lineal para practicar
problemas de razonamiento
Diagramas de flujo
Funcionlinealparapracticar 151024020323-lva1-app6892conrespuestas-15102721035...
Estadistica utp
Publicidad

Destacado (20)

PPTX
期中報告 Tx rx
PPTX
Cm 1. dhiman leukemia
DOCX
DOCX
Geovanny yungan (14)
DOCX
Geovanny yungan (7)
PPTX
Yungan(uOI
PPTX
訴說溫度的熱情
PDF
Conceptos básicos
PDF
Find Meaning in Puglia May 2017 Trip
PPTX
Presentation1
DOCX
PDF
Presentacion Salt Pepper N Lime
DOCX
Geovanny yungan (2) ghghhu
PPTX
Gtc 25 presentación
PPTX
Transparent led film display solution
PDF
LCCO General Meeting 110316
DOCX
BryanShelton2016
PDF
Design for behavioral change (by David Pas)
PDF
Simulation technology, speed up your iterative process (by Jan Buytaert)
PDF
期中報告 Tx rx
Cm 1. dhiman leukemia
Geovanny yungan (14)
Geovanny yungan (7)
Yungan(uOI
訴說溫度的熱情
Conceptos básicos
Find Meaning in Puglia May 2017 Trip
Presentation1
Presentacion Salt Pepper N Lime
Geovanny yungan (2) ghghhu
Gtc 25 presentación
Transparent led film display solution
LCCO General Meeting 110316
BryanShelton2016
Design for behavioral change (by David Pas)
Simulation technology, speed up your iterative process (by Jan Buytaert)
Publicidad

Similar a Practica4 (20)

DOCX
Ejercicios en java
PPTX
ilide.info-algoritmo-de-euclides-pptx-pr_ea5c16d8b72168c9d17327a5bb7b7100.pptx
PPTX
ilide.info-algoritmo-de-euclides-pptx-pr_ea5c16d8b72168c9d17327a5bb7b7100.pptx
PPTX
Máximo común divisor
PDF
Balotario de preguntas de aritmetica
ODP
MCD Recursivo
PDF
Algoritmo de euclides wikipedia, la enciclopedia libre
PPTX
Máximo+co..
PDF
AED1-U3-2-Apuntes AritmeticaModular-Luciano.pdf
DOCX
Academia sabatina jóvenes talentos
DOCX
Academia sabatina jóvenes talentos
PPTX
Algoritmo de la división, MCD y Ec. Diofánticas_Álgebra I 15-06-21.pptx
PPTX
Algoritmo de la división, MCD y Ec. Diofánticas_Álgebra I 15-06-21.pptx
PDF
Divisibilidad en Z
PDF
Divisibilidad en IN
PPTX
Mximo comn divisor
PPTX
Mximo comn divisor
PPTX
euclides algoritno honduras choluteca .pptx
PPTX
algoritmo de euclides miiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
PPTX
Clase 12 m.c.d.
Ejercicios en java
ilide.info-algoritmo-de-euclides-pptx-pr_ea5c16d8b72168c9d17327a5bb7b7100.pptx
ilide.info-algoritmo-de-euclides-pptx-pr_ea5c16d8b72168c9d17327a5bb7b7100.pptx
Máximo común divisor
Balotario de preguntas de aritmetica
MCD Recursivo
Algoritmo de euclides wikipedia, la enciclopedia libre
Máximo+co..
AED1-U3-2-Apuntes AritmeticaModular-Luciano.pdf
Academia sabatina jóvenes talentos
Academia sabatina jóvenes talentos
Algoritmo de la división, MCD y Ec. Diofánticas_Álgebra I 15-06-21.pptx
Algoritmo de la división, MCD y Ec. Diofánticas_Álgebra I 15-06-21.pptx
Divisibilidad en Z
Divisibilidad en IN
Mximo comn divisor
Mximo comn divisor
euclides algoritno honduras choluteca .pptx
algoritmo de euclides miiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
Clase 12 m.c.d.

Más de Geovanny Yungán (20)

DOCX
Sibalo final
DOCX
DOCX
Matemáticas
DOCX
Artesanía de-la-ciudad-de-riobamba
DOCX
Geovanny yungan (18)
DOCX
Geovanny yungan (17)
DOCX
Geovanny yungan (16)
DOCX
Geovanny yungan
PDF
Geovanny yungan redes
DOCX
Geovanny yungan (13)
DOCX
Geovanny yungan (12)
DOCX
Geovanny yungan (11)
DOCX
Geovanny yungan (10)
DOCX
Geovanny yungan (9)
DOCX
Geovanny yungan (8)
DOCX
Geovanny yungan (6)n
DOCX
Geovanny yungan (5)
DOCX
Geovanny yungan (4)
DOCX
Geovanny yungan (2)
PDF
Sibalo final
Matemáticas
Artesanía de-la-ciudad-de-riobamba
Geovanny yungan (18)
Geovanny yungan (17)
Geovanny yungan (16)
Geovanny yungan
Geovanny yungan redes
Geovanny yungan (13)
Geovanny yungan (12)
Geovanny yungan (11)
Geovanny yungan (10)
Geovanny yungan (9)
Geovanny yungan (8)
Geovanny yungan (6)n
Geovanny yungan (5)
Geovanny yungan (4)
Geovanny yungan (2)

Último (20)

PDF
TALLER DE ESTADISTICA BASICA para principiantes y no tan basicos
DOCX
PLANES DE área ciencias naturales y aplicadas
PDF
Manual del Gobierno Escolar -MINEDUC.pdf
DOCX
Programa_Sintetico_Fase_4.docx 3° Y 4°..
PDF
Iniciación Al Aprendizaje Basado En Proyectos ABP Ccesa007.pdf
PPTX
4. Qué es un computador PARA GRADO CUARTO.pptx
PPTX
LAS MIGRACIONES E INVASIONES Y EL INICIO EDAD MEDIA
PPTX
Clase 3 del silabo-gestion y control financiero
PDF
Modelo Educativo SUB 2023versión final.pdf
PDF
Los hombres son de Marte - Las mujeres de Venus Ccesa007.pdf
PDF
Ernst Cassirer - Antropologia Filosofica.pdf
PPTX
BIZANCIO. EVOLUCIÓN HISTORICA, RAGOS POLÍTICOS, ECONOMICOS Y SOCIALES
PDF
2.0 Introduccion a processing, y como obtenerlo
PDF
Telos 127 Generacion Al fa Beta - fundaciontelefonica
DOCX
PLAN DE CASTELLANO 2021 actualizado a la normativa
PDF
LIBRO 2-SALUD Y AMBIENTE-4TO CEBA avanzado.pdf
PDF
CURRICULAR DE PRIMARIA santa ursula..pdf
PDF
La Formacion Universitaria en Nuevos Escenarios Ccesa007.pdf
DOC
Manual de Convivencia 2025 actualizado a las normas vigentes
DOC
4°_GRADO_-_SESIONES_DEL_11_AL_15_DE_AGOSTO.doc
TALLER DE ESTADISTICA BASICA para principiantes y no tan basicos
PLANES DE área ciencias naturales y aplicadas
Manual del Gobierno Escolar -MINEDUC.pdf
Programa_Sintetico_Fase_4.docx 3° Y 4°..
Iniciación Al Aprendizaje Basado En Proyectos ABP Ccesa007.pdf
4. Qué es un computador PARA GRADO CUARTO.pptx
LAS MIGRACIONES E INVASIONES Y EL INICIO EDAD MEDIA
Clase 3 del silabo-gestion y control financiero
Modelo Educativo SUB 2023versión final.pdf
Los hombres son de Marte - Las mujeres de Venus Ccesa007.pdf
Ernst Cassirer - Antropologia Filosofica.pdf
BIZANCIO. EVOLUCIÓN HISTORICA, RAGOS POLÍTICOS, ECONOMICOS Y SOCIALES
2.0 Introduccion a processing, y como obtenerlo
Telos 127 Generacion Al fa Beta - fundaciontelefonica
PLAN DE CASTELLANO 2021 actualizado a la normativa
LIBRO 2-SALUD Y AMBIENTE-4TO CEBA avanzado.pdf
CURRICULAR DE PRIMARIA santa ursula..pdf
La Formacion Universitaria en Nuevos Escenarios Ccesa007.pdf
Manual de Convivencia 2025 actualizado a las normas vigentes
4°_GRADO_-_SESIONES_DEL_11_AL_15_DE_AGOSTO.doc

Practica4

  • 1. UNIVERSIDAD NACIONAL DE CHIMBORAZO FACULTAD DE CIENCIAS DE LA EDUCACION HUMANAS Y TECNOLOGIAS NOMBRE: GEOVANNY YUNGAN PRACTICA 4 EJERCICIO 1 Calcule el máximo común divisor entre dos números , mediante el algoritmo de Euclides. El a lgor itmo de Euclides es un procedimiento para calcular el m.c.d. de dos números. Los pasos son: a. Se divide el número mayor entre el menor. b. Si: . La división es exacta, el divisor es el m.c.d. . La división no es exacta, dividimos el div isor entre el residuo obtenido y se continúa de esta forma hasta obtener una división exacta, siendo el último div isor el m.c.d. m. c. d. (72, 16) DESARROLLO //GEOVANNY YUNGAN import java.util.Scanner; class mcd { public static void main(String args []) { Scanner datos=new Scanner(System.in); int r=0,a=0,b=0; System.out.println("ingrese el primer numero "); a=datos.nextInt(); System.out.println("ingrese el segundo numero "); b=datos.nextInt(); while (b>0) {
  • 2. r=a%b; a=b; b=r; } System.out.println("****El mcm***" +a); } } EJECUCIÓN EJERCICIO 2 Realice la siguiente serie //GEOVANNY YUNGAN import java.util.Scanner; class series { public static void main(String[] args) { Scanner nu=new Scanner(System.in); double s,c=0,a=0,k=0,serie; System.out.println("Ingrese un numero de serie:"); s=nu.nextDouble(); c=1; while(c<=s) { if(c%2==0)