SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Ciclo repetitivo
       - Para
       - Mientras

       1*mientras (1<10) haga

         Instrucciones

          I=I+I

Fin-mientras

MIENTRAS NO SEA POSIBLE ENTRAR
*EJEMPLO

SE TIENE UN GRUPO DE 5 VEDEDORES, POR CADA VENDEDOR LE DAN LA SIGUIENTE
INFORMACION.

-D.I

-NOMBRE

- V.DE LA VENTAS

LE PIDEN ENCONTRAR EL MEJOR VENDEDOR, LA SUMA TOTAL DE LAS VENTAS

QUE ME PIDEN
EL MEJOR VENDEDORY LA SUMA TOTAL DE LAS VENTAS

ME DAN

D.I, NOMBRE, VALOR DE LA VENTAS

PROCESO

Mientras (I<=5) haga

Flujo. Imprima

“ingrese documento de identidad”)

D.I=flujo. Leer carácter

Flujo. Imprima (“ingrese nombre”)
Nom=flujo. Leer carácter

     Flujo. Imprima (“ingrese valor de mes”)

     Vvm= flujo. Leer real

       Si (vvm<v mayor)

          Entonces

          V mayor= vvm

          N mayor= nom

       Fin_si

       Suma=suma+ vvm

       I=I+1

                    TABA DE REQUERIMIENTO

     NOMBRE      DESCRIPCION ENTRADA              SALIDA
     R1          Compare e   D.I, nom, vvm,       I, D.I, nom ,VVM EN
                 ingrese     ingresados por el    LA MEMORIA DEL PC
                             usuario
     R2          Comparar y  VVM, Mayor           Vmayor=VVM
                 asignar                          Nmayor=nom
     R3          Operar      Suma,VVI             Suma=suma+ VVI
     R4          Operar      i                    I=i+1
     R5          Mostrar     Vmayor,Nmayor,suma   Vmayor,Nmayor,suma
                 resultados




      GRUPO
+i entero                        Flujo
+ D.i carácter
+mon carácter                    +imprima
+ nmayor caracter
                                 +leer entero
+vvm real
+vmayor real
+suma real                     DIAGRAMA DE CLASES




     FIN_MIENTRAS

     D.I     NOM       VVM

     10      Juan      100

     20      Pedro     200

     30      Chucho    1000

     40      Jacinto   300

     50      María     400



     Vmayor             nmayor           suma

     0                  Juan             0+100

     100                Pedro            100+200

     200                Chucho           300+300

     1000                                1300+300

                                         1600+400
Clase mejor vendedor

Método publico estático vacio

I entero

D.I, NOM, MAYOR Carácter

VVM, VMAYOR, SUMA Real

I=1

Mientras (I<=5) haga

Flujo. Imprima

“ingrese documento de identidad”)

D.I=flujo. Leer carácter

Flujo. Imprima (“ingrese nombre”)



Nom=flujo. Leer carácter

Flujo. Imprima (“ingrese valor de mes”)

Vvm= flujo. Leer real

 Si (vvm<v mayor)

      Entonces

      V mayor= vvm

      N mayor= nom

  Fin_si

  Suma=suma+ vvm

  I=I+1

FIN_MIENTRAS

Suma=suma + VVM
I=1

I=I+1

FIN_MIENTRAS (“el mejor vendedor es:”+ mayor)

FLUJO.IMPRIMA (“el valor de ventas fue:”+ vmayor)

Flujo. Imprima (“la suma de las ventas es”+suma)

Fin _método

 Fin_ clase

2 forma mientras

Sintaxis

Weitere ähnliche Inhalte

Empfohlen

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
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
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
 

Ciclo repetitivo

  • 1. Ciclo repetitivo - Para - Mientras 1*mientras (1<10) haga Instrucciones I=I+I Fin-mientras MIENTRAS NO SEA POSIBLE ENTRAR *EJEMPLO SE TIENE UN GRUPO DE 5 VEDEDORES, POR CADA VENDEDOR LE DAN LA SIGUIENTE INFORMACION. -D.I -NOMBRE - V.DE LA VENTAS LE PIDEN ENCONTRAR EL MEJOR VENDEDOR, LA SUMA TOTAL DE LAS VENTAS QUE ME PIDEN EL MEJOR VENDEDORY LA SUMA TOTAL DE LAS VENTAS ME DAN D.I, NOMBRE, VALOR DE LA VENTAS PROCESO Mientras (I<=5) haga Flujo. Imprima “ingrese documento de identidad”) D.I=flujo. Leer carácter Flujo. Imprima (“ingrese nombre”)
  • 2. Nom=flujo. Leer carácter Flujo. Imprima (“ingrese valor de mes”) Vvm= flujo. Leer real Si (vvm<v mayor) Entonces V mayor= vvm N mayor= nom Fin_si Suma=suma+ vvm I=I+1 TABA DE REQUERIMIENTO NOMBRE DESCRIPCION ENTRADA SALIDA R1 Compare e D.I, nom, vvm, I, D.I, nom ,VVM EN ingrese ingresados por el LA MEMORIA DEL PC usuario R2 Comparar y VVM, Mayor Vmayor=VVM asignar Nmayor=nom R3 Operar Suma,VVI Suma=suma+ VVI R4 Operar i I=i+1 R5 Mostrar Vmayor,Nmayor,suma Vmayor,Nmayor,suma resultados GRUPO +i entero Flujo + D.i carácter +mon carácter +imprima + nmayor caracter +leer entero +vvm real +vmayor real
  • 3. +suma real DIAGRAMA DE CLASES FIN_MIENTRAS D.I NOM VVM 10 Juan 100 20 Pedro 200 30 Chucho 1000 40 Jacinto 300 50 María 400 Vmayor nmayor suma 0 Juan 0+100 100 Pedro 100+200 200 Chucho 300+300 1000 1300+300 1600+400
  • 4. Clase mejor vendedor Método publico estático vacio I entero D.I, NOM, MAYOR Carácter VVM, VMAYOR, SUMA Real I=1 Mientras (I<=5) haga Flujo. Imprima “ingrese documento de identidad”) D.I=flujo. Leer carácter Flujo. Imprima (“ingrese nombre”) Nom=flujo. Leer carácter Flujo. Imprima (“ingrese valor de mes”) Vvm= flujo. Leer real Si (vvm<v mayor) Entonces V mayor= vvm N mayor= nom Fin_si Suma=suma+ vvm I=I+1 FIN_MIENTRAS Suma=suma + VVM
  • 5. I=1 I=I+1 FIN_MIENTRAS (“el mejor vendedor es:”+ mayor) FLUJO.IMPRIMA (“el valor de ventas fue:”+ vmayor) Flujo. Imprima (“la suma de las ventas es”+suma) Fin _método Fin_ clase 2 forma mientras Sintaxis