SlideShare una empresa de Scribd logo
1 de 26
Problemas de algoritmo Jeyssonferreiraurquijo                    1002                   IETAG Jeissonestrada   suarez
ALGORITMO datopersonal Inicio               CARACTER   nombre[30], sexo, Ec           Entero  edad            1.-Leer nombre, sexo, edad, Ec               // Ec = estado civil            2.-MOSTRAR nombre, sexo, edad , Ec FIN
ALGORITMO edad INICIO              CARACTER  nombre[30].              Entero  edad              1.-LEER nombre, edad              2.-MOSTRAR nombre, edad  FIN
ALGORITMO adulto INICIO              CARACTER  nombre[30].              Entero  edad              1.-LEER nombre, edad              2.-MOSTRAR nombre, edad  FIN INICIO              CARACTER  nombre[30].              Entero  edad              1.-LEER nombre, edad              2.-MOSTRAR nombre, edad  FIN
ALGORITMO votar INICIO              Cadena  nombre              Entero  edad              1.-LEER  nombre , edad             2.-SI ( edad >= 18) ENTONCES                          a)MOSTRAR nombre                 SINO                          a)MOSTRAR “no puede votar”                 FINSI  FIN
ALGORITMO sex INICIO          Cadena  nombre           Entero  sexo , edad               1.-LEER nombre, sexo, edad               2.-SI (sexo = 1) y (edad>= 18)  ENTONCES                                a)MOSTRAR nombre.                   FINSI  FIN
ALGORITMO hombsolt INICIO              Cadena  nombre               Entero  edad , sexo, ec                               // ec =estado civil.                1.-LEER nombre, edad, sexo, ec.               2.-SI (sexo = 1) y (ec = 1) y (edad >= 18)                        ENTONCES                                  a)MOSTRAR nombre                    FINSI  FIN
ALGORITMO mensaje INICIO               CARÁCTER  nombre[30]  , s, ec             // s = sexo,     e = edad               Entero, e                                                      // ec = estado civil                1.-LEER nombre, e, s, ec              2.-SI (s = “M”) o ((s = “F”) y (e < 18)) o ((s = “M”) y  ( ec = “C”))  ENTONCES                                                                                                                                           a)MOSTRAR nombre, “usted no se manda”                       SINO                                                a)MOSTRAR nombre.                    FINSI  FIN
ALGORITMO valorabsoluto INICIO                Real , x, VA                            //  {x es el numero}                 1.-LEER x                 2.-VA ç  abs (x)                          3.- MOSTRAR VA             // VA es el valor absoluto  FIN
ALGORITMO RC INICIO              Real ,num, RC             1.-LEER num              2.- SI (num >= 0)  ENTONCES  a.      RC ß sqrt (num)  b.      MOSTRAR RC                       SINO                                     a.  MOSTRAR num “tieneraíz imaginaria”                    FINSI  FIN
ALGORITMO pos INICIO              Real  A, B                1.-LEER A, B                2.-SI (A>0)  ENTONCES  MOSTRAR  A                     FINSI                3.-SI (B>0)                           ENTONCES   MOSTRAR B                     FINSI  FIN
ALGORITMO numpos INICIO               Real , A, B               1.-LEER A, B               2.-SI (A>0) y (B>0) ENTONCES                           a)MOSTRAR  A, B                   FINSI  FIN
ALGORITMO num INICIO               Real A ,B               1.-LEER A, B               2.-SI (A>0) o (B>0) ENTONCES                             a) MOSTRAR A, B                    FINSI  FIN
ALGORITMO signosop INICIO                Real A, B                1.-LEER A, B                2.-SI ( A¹ B ) y ( B¹0 ) ENTONCES  a)     SI (A<0 ) y (B>0) o (A>0) y (B<0) ENTONCES                 1) MOSTRAR A, B         FINSI                     FINSI  FIN
ALGORITMO sum INICIO              Real, A, B, S                                                       // S, es la suma             1.- LEER A, B             2.- Sç A + B             3.- MOSTRAR  A, B, S  FIN
ALGORITMOsuma INICIO              Real A, B, S                                                  // S es la suma              1.- LEER A, B              2.- S ç A + B              3.- SI ( S < 0 ) ENTONCES                        a) MOSTRAR A, B, S                   SINO  a)     MOSTRAR A, B                    FINSI  FIN
ALGORITMO cociente INICIO               Real A, B , COC                                               // COC es el cociente               1.-LEER A, B               2.- SI ( B = 0)  ENTONCES  a.      MOSTRAR “la división no es posible”                        SINO                         a. COC ç A / B    b. MOSTRAR COC “es el cociente”          FINSI                          FIN
ALGORITMO salario INICIO                 Cadena  nombre               Real  SxH, SM                              // SxH es salario por hora, SM, salario mensual               Entero HT                                     // HT es el número de horas trabajadas               1.- LEER nombre SxH, HT               2.- SM ç SxH * HT               3.- MOSTRAR nombre, SM  FIN
ALGORITMO porciento INICIO                Real Num , PC                       // PC eselporcentaje               1.- LEER , Num                2.- PC ç (5/100) * Num                3.- MOSTRAR  PC, Num  FIN
ALGORITMO retencion INICIO              Real SxH, P, R, SB, SN, HT     // SxH salario por hora, P porcentaje de retención,                                                                 R Retención, SB Salario bruto, SN salario neto,                                                                  HT, horas trabajadas.                Cadena , nombre               1.- LEER nombre Sxh, HT, P               2.- SBçSxH * HT               3.- Rç(P*SB)/100               4.- SNçSB-R               5.- MOSTRAR SB, R, SN,  nombre  FIN
ALGORITMO salarioneto INICIO              Cadena, nombre              Real, SB, SN, Ret             // SB salario bruto, SN salario neto, Ret retención               1.- LEER nombre , SB               2.- SI (SB <= 1500) ENTONCES  a)     Ret ç 0                     SINO                              1) SI ( SB > 3000) ENTONCES  a)     Retç(8/100) * SB                                  SINO                                        a) Ret ç(5/100)*SB                                   FINSI                     FINSI                3.- SN çSB - Ret               4.-MOSTRAR nombre, SB, Ret, SN  FIN
ALGORITMO sueldoneto INICIO      Real, Sb, Ht, SN, Sextr, Extr   // Sb salario por hora, Ht horas trabajadas, Extr hora extra                                                        // SN salario neto,  Sextr, salario por hora extra                                              CARACTER Nombre[30]                constante   Tr = 0.35                                          // Tr  tasa de recargo                  1.- LEER nombre, Sb, Ht,                2.-SI ( Ht>48) ENTONCES                            a)ExtrçHt-48                            b)Sextrç Sb+Sb*Tr                            c)SNç(48*Sb) + (Extr*Sextr)                     SINO                            a)SNçSb*Ht                     FINSI                 3.- MOSTRAR  nombre, SN FIN
ALGORITMO   ciennum INICIO              Entero, i                         1.- PARA  iç 1 HASTA   iç 100   HACER a)     MOSTRAR  i                  FINPARA
ALGORITMO numpar INICIO           Entero  i 1.- PARA  iç 2  HASTA   i ç 1000  INC = 2   HACER                              a) MOSTRAR  i                             FINPARA FIN
ALGORITMO mult3 INICIO             Entero  i,  N             1.- LEER N             2.- PARA   i ç1  HASTA  i ç N    HACER                             a) SI ( i   MOD  3 = 0 )   ENTONCES 1.      MOSTRAR i                                  FINSI                  FINPARA FIN
ALGORITMO nombre INICIO              Entero, i              CARACTER nombre[30]              1.- PARA  i ç1  HASTA  i ç20   HACER a)     LEER  nombre b)    MOSTRAR nombre                   FINPARA      FIN

Más contenido relacionado

Último

Carta de Sabrina Shorff enviada al juez Kevin Castel
Carta de Sabrina Shorff enviada al juez Kevin CastelCarta de Sabrina Shorff enviada al juez Kevin Castel
Carta de Sabrina Shorff enviada al juez Kevin CastelAndySalgado7
 
APOS - Global Médica SA: Contrato de prestación de servicios farmacéuticos
APOS - Global Médica SA: Contrato de prestación de servicios farmacéuticosAPOS - Global Médica SA: Contrato de prestación de servicios farmacéuticos
APOS - Global Médica SA: Contrato de prestación de servicios farmacéuticosEduardo Nelson German
 
Informe Estudio de Opinión en Zapopan Jalisco - ABRIL
Informe Estudio de Opinión en Zapopan Jalisco - ABRILInforme Estudio de Opinión en Zapopan Jalisco - ABRIL
Informe Estudio de Opinión en Zapopan Jalisco - ABRILmerca6
 
Relación del derecho con las ciencias políticas.pptx
Relación del derecho con las ciencias políticas.pptxRelación del derecho con las ciencias políticas.pptx
Relación del derecho con las ciencias políticas.pptxBrunoLaqui
 
El abogado de los Arrieta se queja ante la embajada de España por la presenci...
El abogado de los Arrieta se queja ante la embajada de España por la presenci...El abogado de los Arrieta se queja ante la embajada de España por la presenci...
El abogado de los Arrieta se queja ante la embajada de España por la presenci...20minutos
 
Ampliación de denuncia del Fiscal Federal por medicamentos en La Rioja
Ampliación de denuncia del Fiscal Federal por medicamentos en La RiojaAmpliación de denuncia del Fiscal Federal por medicamentos en La Rioja
Ampliación de denuncia del Fiscal Federal por medicamentos en La RiojaEduardo Nelson German
 
2024-05-02-Carta-145-aniversario-PSOE.pdf
2024-05-02-Carta-145-aniversario-PSOE.pdf2024-05-02-Carta-145-aniversario-PSOE.pdf
2024-05-02-Carta-145-aniversario-PSOE.pdf20minutos
 
Horarios empresa electrica quito 25 de abril de 2024
Horarios empresa electrica quito 25 de abril de 2024Horarios empresa electrica quito 25 de abril de 2024
Horarios empresa electrica quito 25 de abril de 2024ssuseref6ae6
 
calendario de tandeos macrosectores xalapa mayo 2024.pdf
calendario de tandeos macrosectores xalapa mayo 2024.pdfcalendario de tandeos macrosectores xalapa mayo 2024.pdf
calendario de tandeos macrosectores xalapa mayo 2024.pdfredaccionxalapa
 
PRECIOS_M_XIMOS_VIGENTES_DEL_28_DE_ABRIL_AL_4_DE_MAYO_DE_2024.pdf
PRECIOS_M_XIMOS_VIGENTES_DEL_28_DE_ABRIL_AL_4_DE_MAYO_DE_2024.pdfPRECIOS_M_XIMOS_VIGENTES_DEL_28_DE_ABRIL_AL_4_DE_MAYO_DE_2024.pdf
PRECIOS_M_XIMOS_VIGENTES_DEL_28_DE_ABRIL_AL_4_DE_MAYO_DE_2024.pdfredaccionxalapa
 
Boletín semanal informativo 17. Abril 2024
Boletín semanal informativo 17. Abril 2024Boletín semanal informativo 17. Abril 2024
Boletín semanal informativo 17. Abril 2024Nueva Canarias-BC
 
Denuncia en la Justicia Federal por la salud en La Rioja
Denuncia en la Justicia Federal por la salud en La RiojaDenuncia en la Justicia Federal por la salud en La Rioja
Denuncia en la Justicia Federal por la salud en La RiojaEduardo Nelson German
 
LO QUE NUNCA DEBARIA HABER PASADO PACTO CiU PSC (Roque).pptx
LO QUE NUNCA DEBARIA HABER PASADO PACTO CiU PSC (Roque).pptxLO QUE NUNCA DEBARIA HABER PASADO PACTO CiU PSC (Roque).pptx
LO QUE NUNCA DEBARIA HABER PASADO PACTO CiU PSC (Roque).pptxroque fernandez navarro
 
Investigaciones en curso por maniobras con recetas falsas de insulina y tiras...
Investigaciones en curso por maniobras con recetas falsas de insulina y tiras...Investigaciones en curso por maniobras con recetas falsas de insulina y tiras...
Investigaciones en curso por maniobras con recetas falsas de insulina y tiras...Eduardo Nelson German
 
Comoeuropasubdesarrolloaafricawakter.es.pdf
Comoeuropasubdesarrolloaafricawakter.es.pdfComoeuropasubdesarrolloaafricawakter.es.pdf
Comoeuropasubdesarrolloaafricawakter.es.pdfLorenzo Lemes
 

Último (16)

Carta de Sabrina Shorff enviada al juez Kevin Castel
Carta de Sabrina Shorff enviada al juez Kevin CastelCarta de Sabrina Shorff enviada al juez Kevin Castel
Carta de Sabrina Shorff enviada al juez Kevin Castel
 
LA CRÓNICA COMARCA DE ANTEQUERA _ Nº 1078
LA CRÓNICA COMARCA DE ANTEQUERA _ Nº 1078LA CRÓNICA COMARCA DE ANTEQUERA _ Nº 1078
LA CRÓNICA COMARCA DE ANTEQUERA _ Nº 1078
 
APOS - Global Médica SA: Contrato de prestación de servicios farmacéuticos
APOS - Global Médica SA: Contrato de prestación de servicios farmacéuticosAPOS - Global Médica SA: Contrato de prestación de servicios farmacéuticos
APOS - Global Médica SA: Contrato de prestación de servicios farmacéuticos
 
Informe Estudio de Opinión en Zapopan Jalisco - ABRIL
Informe Estudio de Opinión en Zapopan Jalisco - ABRILInforme Estudio de Opinión en Zapopan Jalisco - ABRIL
Informe Estudio de Opinión en Zapopan Jalisco - ABRIL
 
Relación del derecho con las ciencias políticas.pptx
Relación del derecho con las ciencias políticas.pptxRelación del derecho con las ciencias políticas.pptx
Relación del derecho con las ciencias políticas.pptx
 
El abogado de los Arrieta se queja ante la embajada de España por la presenci...
El abogado de los Arrieta se queja ante la embajada de España por la presenci...El abogado de los Arrieta se queja ante la embajada de España por la presenci...
El abogado de los Arrieta se queja ante la embajada de España por la presenci...
 
Ampliación de denuncia del Fiscal Federal por medicamentos en La Rioja
Ampliación de denuncia del Fiscal Federal por medicamentos en La RiojaAmpliación de denuncia del Fiscal Federal por medicamentos en La Rioja
Ampliación de denuncia del Fiscal Federal por medicamentos en La Rioja
 
2024-05-02-Carta-145-aniversario-PSOE.pdf
2024-05-02-Carta-145-aniversario-PSOE.pdf2024-05-02-Carta-145-aniversario-PSOE.pdf
2024-05-02-Carta-145-aniversario-PSOE.pdf
 
Horarios empresa electrica quito 25 de abril de 2024
Horarios empresa electrica quito 25 de abril de 2024Horarios empresa electrica quito 25 de abril de 2024
Horarios empresa electrica quito 25 de abril de 2024
 
calendario de tandeos macrosectores xalapa mayo 2024.pdf
calendario de tandeos macrosectores xalapa mayo 2024.pdfcalendario de tandeos macrosectores xalapa mayo 2024.pdf
calendario de tandeos macrosectores xalapa mayo 2024.pdf
 
PRECIOS_M_XIMOS_VIGENTES_DEL_28_DE_ABRIL_AL_4_DE_MAYO_DE_2024.pdf
PRECIOS_M_XIMOS_VIGENTES_DEL_28_DE_ABRIL_AL_4_DE_MAYO_DE_2024.pdfPRECIOS_M_XIMOS_VIGENTES_DEL_28_DE_ABRIL_AL_4_DE_MAYO_DE_2024.pdf
PRECIOS_M_XIMOS_VIGENTES_DEL_28_DE_ABRIL_AL_4_DE_MAYO_DE_2024.pdf
 
Boletín semanal informativo 17. Abril 2024
Boletín semanal informativo 17. Abril 2024Boletín semanal informativo 17. Abril 2024
Boletín semanal informativo 17. Abril 2024
 
Denuncia en la Justicia Federal por la salud en La Rioja
Denuncia en la Justicia Federal por la salud en La RiojaDenuncia en la Justicia Federal por la salud en La Rioja
Denuncia en la Justicia Federal por la salud en La Rioja
 
LO QUE NUNCA DEBARIA HABER PASADO PACTO CiU PSC (Roque).pptx
LO QUE NUNCA DEBARIA HABER PASADO PACTO CiU PSC (Roque).pptxLO QUE NUNCA DEBARIA HABER PASADO PACTO CiU PSC (Roque).pptx
LO QUE NUNCA DEBARIA HABER PASADO PACTO CiU PSC (Roque).pptx
 
Investigaciones en curso por maniobras con recetas falsas de insulina y tiras...
Investigaciones en curso por maniobras con recetas falsas de insulina y tiras...Investigaciones en curso por maniobras con recetas falsas de insulina y tiras...
Investigaciones en curso por maniobras con recetas falsas de insulina y tiras...
 
Comoeuropasubdesarrolloaafricawakter.es.pdf
Comoeuropasubdesarrolloaafricawakter.es.pdfComoeuropasubdesarrolloaafricawakter.es.pdf
Comoeuropasubdesarrolloaafricawakter.es.pdf
 

Destacado

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
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 

Destacado (20)

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...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Algoritmos de problemas básicos

  • 1. Problemas de algoritmo Jeyssonferreiraurquijo 1002 IETAG Jeissonestrada suarez
  • 2. ALGORITMO datopersonal Inicio CARACTER nombre[30], sexo, Ec Entero edad 1.-Leer nombre, sexo, edad, Ec // Ec = estado civil 2.-MOSTRAR nombre, sexo, edad , Ec FIN
  • 3. ALGORITMO edad INICIO CARACTER nombre[30]. Entero edad 1.-LEER nombre, edad 2.-MOSTRAR nombre, edad FIN
  • 4. ALGORITMO adulto INICIO CARACTER nombre[30]. Entero edad 1.-LEER nombre, edad 2.-MOSTRAR nombre, edad FIN INICIO CARACTER nombre[30]. Entero edad 1.-LEER nombre, edad 2.-MOSTRAR nombre, edad FIN
  • 5. ALGORITMO votar INICIO Cadena nombre Entero edad 1.-LEER nombre , edad 2.-SI ( edad >= 18) ENTONCES a)MOSTRAR nombre SINO a)MOSTRAR “no puede votar” FINSI FIN
  • 6. ALGORITMO sex INICIO Cadena nombre Entero sexo , edad 1.-LEER nombre, sexo, edad 2.-SI (sexo = 1) y (edad>= 18) ENTONCES a)MOSTRAR nombre. FINSI FIN
  • 7. ALGORITMO hombsolt INICIO Cadena nombre Entero edad , sexo, ec // ec =estado civil. 1.-LEER nombre, edad, sexo, ec. 2.-SI (sexo = 1) y (ec = 1) y (edad >= 18) ENTONCES a)MOSTRAR nombre FINSI FIN
  • 8. ALGORITMO mensaje INICIO CARÁCTER nombre[30] , s, ec // s = sexo, e = edad Entero, e // ec = estado civil 1.-LEER nombre, e, s, ec 2.-SI (s = “M”) o ((s = “F”) y (e < 18)) o ((s = “M”) y ( ec = “C”)) ENTONCES a)MOSTRAR nombre, “usted no se manda” SINO a)MOSTRAR nombre. FINSI FIN
  • 9. ALGORITMO valorabsoluto INICIO Real , x, VA // {x es el numero} 1.-LEER x 2.-VA ç abs (x) 3.- MOSTRAR VA // VA es el valor absoluto FIN
  • 10. ALGORITMO RC INICIO Real ,num, RC 1.-LEER num 2.- SI (num >= 0) ENTONCES a. RC ß sqrt (num) b. MOSTRAR RC SINO a. MOSTRAR num “tieneraíz imaginaria” FINSI FIN
  • 11. ALGORITMO pos INICIO Real A, B 1.-LEER A, B 2.-SI (A>0) ENTONCES MOSTRAR A FINSI 3.-SI (B>0) ENTONCES MOSTRAR B FINSI FIN
  • 12. ALGORITMO numpos INICIO Real , A, B 1.-LEER A, B 2.-SI (A>0) y (B>0) ENTONCES a)MOSTRAR A, B FINSI FIN
  • 13. ALGORITMO num INICIO Real A ,B 1.-LEER A, B 2.-SI (A>0) o (B>0) ENTONCES a) MOSTRAR A, B FINSI FIN
  • 14. ALGORITMO signosop INICIO Real A, B 1.-LEER A, B 2.-SI ( A¹ B ) y ( B¹0 ) ENTONCES a) SI (A<0 ) y (B>0) o (A>0) y (B<0) ENTONCES 1) MOSTRAR A, B FINSI FINSI FIN
  • 15. ALGORITMO sum INICIO Real, A, B, S // S, es la suma 1.- LEER A, B 2.- Sç A + B 3.- MOSTRAR A, B, S FIN
  • 16. ALGORITMOsuma INICIO Real A, B, S // S es la suma 1.- LEER A, B 2.- S ç A + B 3.- SI ( S < 0 ) ENTONCES a) MOSTRAR A, B, S SINO a) MOSTRAR A, B FINSI FIN
  • 17. ALGORITMO cociente INICIO Real A, B , COC // COC es el cociente 1.-LEER A, B 2.- SI ( B = 0) ENTONCES a. MOSTRAR “la división no es posible” SINO a. COC ç A / B b. MOSTRAR COC “es el cociente” FINSI FIN
  • 18. ALGORITMO salario INICIO Cadena nombre Real SxH, SM // SxH es salario por hora, SM, salario mensual Entero HT // HT es el número de horas trabajadas 1.- LEER nombre SxH, HT 2.- SM ç SxH * HT 3.- MOSTRAR nombre, SM FIN
  • 19. ALGORITMO porciento INICIO Real Num , PC // PC eselporcentaje 1.- LEER , Num 2.- PC ç (5/100) * Num 3.- MOSTRAR PC, Num FIN
  • 20. ALGORITMO retencion INICIO Real SxH, P, R, SB, SN, HT // SxH salario por hora, P porcentaje de retención, R Retención, SB Salario bruto, SN salario neto, HT, horas trabajadas. Cadena , nombre 1.- LEER nombre Sxh, HT, P 2.- SBçSxH * HT 3.- Rç(P*SB)/100 4.- SNçSB-R 5.- MOSTRAR SB, R, SN, nombre FIN
  • 21. ALGORITMO salarioneto INICIO Cadena, nombre Real, SB, SN, Ret // SB salario bruto, SN salario neto, Ret retención 1.- LEER nombre , SB 2.- SI (SB <= 1500) ENTONCES a) Ret ç 0 SINO 1) SI ( SB > 3000) ENTONCES a) Retç(8/100) * SB SINO a) Ret ç(5/100)*SB FINSI FINSI 3.- SN çSB - Ret 4.-MOSTRAR nombre, SB, Ret, SN FIN
  • 22. ALGORITMO sueldoneto INICIO      Real, Sb, Ht, SN, Sextr, Extr   // Sb salario por hora, Ht horas trabajadas, Extr hora extra                                                        // SN salario neto,  Sextr, salario por hora extra                                              CARACTER Nombre[30]                constante   Tr = 0.35                                          // Tr  tasa de recargo                  1.- LEER nombre, Sb, Ht,                2.-SI ( Ht>48) ENTONCES                            a)ExtrçHt-48                            b)Sextrç Sb+Sb*Tr                            c)SNç(48*Sb) + (Extr*Sextr)                     SINO                            a)SNçSb*Ht                     FINSI                 3.- MOSTRAR  nombre, SN FIN
  • 23. ALGORITMO   ciennum INICIO              Entero, i                         1.- PARA  iç 1 HASTA   iç 100   HACER a)     MOSTRAR  i                  FINPARA
  • 24. ALGORITMO numpar INICIO           Entero  i 1.- PARA  iç 2  HASTA   i ç 1000  INC = 2   HACER                              a) MOSTRAR  i                             FINPARA FIN
  • 25. ALGORITMO mult3 INICIO             Entero  i,  N             1.- LEER N             2.- PARA   i ç1  HASTA  i ç N    HACER                             a) SI ( i   MOD  3 = 0 )   ENTONCES 1.      MOSTRAR i                                  FINSI                  FINPARA FIN
  • 26. ALGORITMO nombre INICIO              Entero, i              CARACTER nombre[30]              1.- PARA  i ç1  HASTA  i ç20   HACER a)     LEER  nombre b)    MOSTRAR nombre                   FINPARA      FIN