SlideShare una empresa de Scribd logo
1 de 6
ALGORITMOS
CON CICLO
REPETITIVOS
(mientras que)
Autoras: Liliana V. Vergara
Mabel C. Barragán
ALGORITMO
• Un señor tiene 40 alcancías. Cada alcancía
contiene n1 monedas de 50 cts., n2 de 25 cts.,
n3 de 10 cts., n4 de 5 cts., y n5 de 1 ctv.
Escriba un programa para conocer cuanto
dinero hay en cada alcancía.
ANALISIS DEL PROBLEMA
• Formular problema: no tenemos cuanto
dinero hay en cada alcancía
• Resultados esperados: saber cuanto dinero
hay en cada alcancía
• Restricciones: cuantas monedas hay de cada
valor ni como están distribuidas
• Datos disponibles: tenemos n1 de 50 cts., n2
de 25 cts., n3 de 10 cts., n4 de 5 cts., y n5 de 1
ctv.
• Procesos necesarios: ciclo repetitivo mientras
que
PSEUDOCODIGO
• Proceso alcancía
• cont<-1
•
• Si cont<3 Entonces
• Mientras (cont<41) Hacer
•
• Escribir "Escriba el numero de monedas de 50"
• Leer n1
• n1<-n1*50
• Escribir "Escriba el numero de monedas de 25"
• leer n2
• n2<-n2*25
• Escribir "Escriba el numero de monedas de 10"
• Leer n3
• n3<-n3*10
• Escribir "Escriba el numero de monedas de 5"
• leer n4
• n4<- n4 * 5
• Escribir "Escriba el numero de monedas de 1"
• leer n5
• n5<- n5 * 1
•
• cont2<-n1+n2+n3+n4+n5
•
• escribir "la alcancía ",cont," tiene ",(cont2)," monedas"
• escribir " "
•
• cont<-cont+1
•
• Fin Mientras
• Fin Si
•
• Fin Proceso
DIAGRAMA DE FLUJO DE DATOS
Algoritmos con ciclos repetitivos

Más contenido relacionado

Último

Comite Operativo Ciberseguridad 012020.pptx
Comite Operativo Ciberseguridad 012020.pptxComite Operativo Ciberseguridad 012020.pptx
Comite Operativo Ciberseguridad 012020.pptxClaudiaPerez86192
 
UNIDAD 3 ELECTRODOS.pptx para biopotenciales
UNIDAD 3 ELECTRODOS.pptx para biopotencialesUNIDAD 3 ELECTRODOS.pptx para biopotenciales
UNIDAD 3 ELECTRODOS.pptx para biopotencialesElianaCceresTorrico
 
COMPEDIOS ESTADISTICOS DE PERU EN EL 2023
COMPEDIOS ESTADISTICOS DE PERU EN EL 2023COMPEDIOS ESTADISTICOS DE PERU EN EL 2023
COMPEDIOS ESTADISTICOS DE PERU EN EL 2023RonaldoPaucarMontes
 
hitos del desarrollo psicomotor en niños.docx
hitos del desarrollo psicomotor en niños.docxhitos del desarrollo psicomotor en niños.docx
hitos del desarrollo psicomotor en niños.docxMarcelaArancibiaRojo
 
Procesos-de-la-Industria-Alimentaria-Envasado-en-la-Produccion-de-Alimentos.pptx
Procesos-de-la-Industria-Alimentaria-Envasado-en-la-Produccion-de-Alimentos.pptxProcesos-de-la-Industria-Alimentaria-Envasado-en-la-Produccion-de-Alimentos.pptx
Procesos-de-la-Industria-Alimentaria-Envasado-en-la-Produccion-de-Alimentos.pptxJuanPablo452634
 
CARGAS VIVAS Y CARGAS MUERTASEXPOCI.pptx
CARGAS VIVAS Y CARGAS MUERTASEXPOCI.pptxCARGAS VIVAS Y CARGAS MUERTASEXPOCI.pptx
CARGAS VIVAS Y CARGAS MUERTASEXPOCI.pptxvalenciaespinozadavi1
 
TAREA 8 CORREDOR INTEROCEÁNICO DEL PAÍS.pdf
TAREA 8 CORREDOR INTEROCEÁNICO DEL PAÍS.pdfTAREA 8 CORREDOR INTEROCEÁNICO DEL PAÍS.pdf
TAREA 8 CORREDOR INTEROCEÁNICO DEL PAÍS.pdfAntonioGonzalezIzqui
 
NTP- Determinación de Cloruros en suelos y agregados (1) (1).pptx
NTP- Determinación de Cloruros  en suelos y agregados (1) (1).pptxNTP- Determinación de Cloruros  en suelos y agregados (1) (1).pptx
NTP- Determinación de Cloruros en suelos y agregados (1) (1).pptxBRAYANJOSEPTSANJINEZ
 
LA APLICACIÓN DE LAS PROPIEDADES TEXTUALES A LOS TEXTOS.pdf
LA APLICACIÓN DE LAS PROPIEDADES TEXTUALES A LOS TEXTOS.pdfLA APLICACIÓN DE LAS PROPIEDADES TEXTUALES A LOS TEXTOS.pdf
LA APLICACIÓN DE LAS PROPIEDADES TEXTUALES A LOS TEXTOS.pdfbcondort
 
CHARLA DE INDUCCIÓN SEGURIDAD Y SALUD OCUPACIONAL
CHARLA DE INDUCCIÓN SEGURIDAD Y SALUD OCUPACIONALCHARLA DE INDUCCIÓN SEGURIDAD Y SALUD OCUPACIONAL
CHARLA DE INDUCCIÓN SEGURIDAD Y SALUD OCUPACIONALKATHIAMILAGRITOSSANC
 
Elaboración de la estructura del ADN y ARN en papel.pdf
Elaboración de la estructura del ADN y ARN en papel.pdfElaboración de la estructura del ADN y ARN en papel.pdf
Elaboración de la estructura del ADN y ARN en papel.pdfKEVINYOICIAQUINOSORI
 
clases de porcinos generales de porcinos
clases de porcinos generales de porcinosclases de porcinos generales de porcinos
clases de porcinos generales de porcinosDayanaCarolinaAP
 
Clase 7 MECÁNICA DE FLUIDOS 2 INGENIERIA CIVIL
Clase 7 MECÁNICA DE FLUIDOS 2 INGENIERIA CIVILClase 7 MECÁNICA DE FLUIDOS 2 INGENIERIA CIVIL
Clase 7 MECÁNICA DE FLUIDOS 2 INGENIERIA CIVILProblemSolved
 
Magnetismo y electromagnetismo principios
Magnetismo y electromagnetismo principiosMagnetismo y electromagnetismo principios
Magnetismo y electromagnetismo principiosMarceloQuisbert6
 
01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt
01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt
01 MATERIALES AERONAUTICOS VARIOS clase 1.pptoscarvielma45
 
osciloscopios Mediciones Electricas ingenieria.pdf
osciloscopios Mediciones Electricas ingenieria.pdfosciloscopios Mediciones Electricas ingenieria.pdf
osciloscopios Mediciones Electricas ingenieria.pdfIvanRetambay
 
Quimica Raymond Chang 12va Edicion___pdf
Quimica Raymond Chang 12va Edicion___pdfQuimica Raymond Chang 12va Edicion___pdf
Quimica Raymond Chang 12va Edicion___pdfs7yl3dr4g0n01
 
CAPITULO 4 ANODIZADO DE ALUMINIO ,OBTENCION Y PROCESO
CAPITULO 4 ANODIZADO DE ALUMINIO ,OBTENCION Y PROCESOCAPITULO 4 ANODIZADO DE ALUMINIO ,OBTENCION Y PROCESO
CAPITULO 4 ANODIZADO DE ALUMINIO ,OBTENCION Y PROCESOLUISDAVIDVIZARRETARA
 
Propuesta para la creación de un Centro de Innovación para la Refundación ...
Propuesta para la creación de un Centro de Innovación para la Refundación ...Propuesta para la creación de un Centro de Innovación para la Refundación ...
Propuesta para la creación de un Centro de Innovación para la Refundación ...Dr. Edwin Hernandez
 
Ingeniería clínica 1 Ingeniería biomedica
Ingeniería clínica 1 Ingeniería biomedicaIngeniería clínica 1 Ingeniería biomedica
Ingeniería clínica 1 Ingeniería biomedicaANACENIMENDEZ1
 

Último (20)

Comite Operativo Ciberseguridad 012020.pptx
Comite Operativo Ciberseguridad 012020.pptxComite Operativo Ciberseguridad 012020.pptx
Comite Operativo Ciberseguridad 012020.pptx
 
UNIDAD 3 ELECTRODOS.pptx para biopotenciales
UNIDAD 3 ELECTRODOS.pptx para biopotencialesUNIDAD 3 ELECTRODOS.pptx para biopotenciales
UNIDAD 3 ELECTRODOS.pptx para biopotenciales
 
COMPEDIOS ESTADISTICOS DE PERU EN EL 2023
COMPEDIOS ESTADISTICOS DE PERU EN EL 2023COMPEDIOS ESTADISTICOS DE PERU EN EL 2023
COMPEDIOS ESTADISTICOS DE PERU EN EL 2023
 
hitos del desarrollo psicomotor en niños.docx
hitos del desarrollo psicomotor en niños.docxhitos del desarrollo psicomotor en niños.docx
hitos del desarrollo psicomotor en niños.docx
 
Procesos-de-la-Industria-Alimentaria-Envasado-en-la-Produccion-de-Alimentos.pptx
Procesos-de-la-Industria-Alimentaria-Envasado-en-la-Produccion-de-Alimentos.pptxProcesos-de-la-Industria-Alimentaria-Envasado-en-la-Produccion-de-Alimentos.pptx
Procesos-de-la-Industria-Alimentaria-Envasado-en-la-Produccion-de-Alimentos.pptx
 
CARGAS VIVAS Y CARGAS MUERTASEXPOCI.pptx
CARGAS VIVAS Y CARGAS MUERTASEXPOCI.pptxCARGAS VIVAS Y CARGAS MUERTASEXPOCI.pptx
CARGAS VIVAS Y CARGAS MUERTASEXPOCI.pptx
 
TAREA 8 CORREDOR INTEROCEÁNICO DEL PAÍS.pdf
TAREA 8 CORREDOR INTEROCEÁNICO DEL PAÍS.pdfTAREA 8 CORREDOR INTEROCEÁNICO DEL PAÍS.pdf
TAREA 8 CORREDOR INTEROCEÁNICO DEL PAÍS.pdf
 
NTP- Determinación de Cloruros en suelos y agregados (1) (1).pptx
NTP- Determinación de Cloruros  en suelos y agregados (1) (1).pptxNTP- Determinación de Cloruros  en suelos y agregados (1) (1).pptx
NTP- Determinación de Cloruros en suelos y agregados (1) (1).pptx
 
LA APLICACIÓN DE LAS PROPIEDADES TEXTUALES A LOS TEXTOS.pdf
LA APLICACIÓN DE LAS PROPIEDADES TEXTUALES A LOS TEXTOS.pdfLA APLICACIÓN DE LAS PROPIEDADES TEXTUALES A LOS TEXTOS.pdf
LA APLICACIÓN DE LAS PROPIEDADES TEXTUALES A LOS TEXTOS.pdf
 
CHARLA DE INDUCCIÓN SEGURIDAD Y SALUD OCUPACIONAL
CHARLA DE INDUCCIÓN SEGURIDAD Y SALUD OCUPACIONALCHARLA DE INDUCCIÓN SEGURIDAD Y SALUD OCUPACIONAL
CHARLA DE INDUCCIÓN SEGURIDAD Y SALUD OCUPACIONAL
 
Elaboración de la estructura del ADN y ARN en papel.pdf
Elaboración de la estructura del ADN y ARN en papel.pdfElaboración de la estructura del ADN y ARN en papel.pdf
Elaboración de la estructura del ADN y ARN en papel.pdf
 
clases de porcinos generales de porcinos
clases de porcinos generales de porcinosclases de porcinos generales de porcinos
clases de porcinos generales de porcinos
 
Clase 7 MECÁNICA DE FLUIDOS 2 INGENIERIA CIVIL
Clase 7 MECÁNICA DE FLUIDOS 2 INGENIERIA CIVILClase 7 MECÁNICA DE FLUIDOS 2 INGENIERIA CIVIL
Clase 7 MECÁNICA DE FLUIDOS 2 INGENIERIA CIVIL
 
Magnetismo y electromagnetismo principios
Magnetismo y electromagnetismo principiosMagnetismo y electromagnetismo principios
Magnetismo y electromagnetismo principios
 
01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt
01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt
01 MATERIALES AERONAUTICOS VARIOS clase 1.ppt
 
osciloscopios Mediciones Electricas ingenieria.pdf
osciloscopios Mediciones Electricas ingenieria.pdfosciloscopios Mediciones Electricas ingenieria.pdf
osciloscopios Mediciones Electricas ingenieria.pdf
 
Quimica Raymond Chang 12va Edicion___pdf
Quimica Raymond Chang 12va Edicion___pdfQuimica Raymond Chang 12va Edicion___pdf
Quimica Raymond Chang 12va Edicion___pdf
 
CAPITULO 4 ANODIZADO DE ALUMINIO ,OBTENCION Y PROCESO
CAPITULO 4 ANODIZADO DE ALUMINIO ,OBTENCION Y PROCESOCAPITULO 4 ANODIZADO DE ALUMINIO ,OBTENCION Y PROCESO
CAPITULO 4 ANODIZADO DE ALUMINIO ,OBTENCION Y PROCESO
 
Propuesta para la creación de un Centro de Innovación para la Refundación ...
Propuesta para la creación de un Centro de Innovación para la Refundación ...Propuesta para la creación de un Centro de Innovación para la Refundación ...
Propuesta para la creación de un Centro de Innovación para la Refundación ...
 
Ingeniería clínica 1 Ingeniería biomedica
Ingeniería clínica 1 Ingeniería biomedicaIngeniería clínica 1 Ingeniería biomedica
Ingeniería clínica 1 Ingeniería biomedica
 

Destacado

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Destacado (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Algoritmos con ciclos repetitivos

  • 1. ALGORITMOS CON CICLO REPETITIVOS (mientras que) Autoras: Liliana V. Vergara Mabel C. Barragán
  • 2. ALGORITMO • Un señor tiene 40 alcancías. Cada alcancía contiene n1 monedas de 50 cts., n2 de 25 cts., n3 de 10 cts., n4 de 5 cts., y n5 de 1 ctv. Escriba un programa para conocer cuanto dinero hay en cada alcancía.
  • 3. ANALISIS DEL PROBLEMA • Formular problema: no tenemos cuanto dinero hay en cada alcancía • Resultados esperados: saber cuanto dinero hay en cada alcancía • Restricciones: cuantas monedas hay de cada valor ni como están distribuidas • Datos disponibles: tenemos n1 de 50 cts., n2 de 25 cts., n3 de 10 cts., n4 de 5 cts., y n5 de 1 ctv. • Procesos necesarios: ciclo repetitivo mientras que
  • 4. PSEUDOCODIGO • Proceso alcancía • cont<-1 • • Si cont<3 Entonces • Mientras (cont<41) Hacer • • Escribir "Escriba el numero de monedas de 50" • Leer n1 • n1<-n1*50 • Escribir "Escriba el numero de monedas de 25" • leer n2 • n2<-n2*25 • Escribir "Escriba el numero de monedas de 10" • Leer n3 • n3<-n3*10 • Escribir "Escriba el numero de monedas de 5" • leer n4 • n4<- n4 * 5 • Escribir "Escriba el numero de monedas de 1" • leer n5 • n5<- n5 * 1 • • cont2<-n1+n2+n3+n4+n5 • • escribir "la alcancía ",cont," tiene ",(cont2)," monedas" • escribir " " • • cont<-cont+1 • • Fin Mientras • Fin Si • • Fin Proceso
  • 5. DIAGRAMA DE FLUJO DE DATOS