SlideShare una empresa de Scribd logo
La Toma de decisiones en
Lenguaje C
Con el lenguaje C++ puede tomar decisiones
gracias a 2 estructuras:
B). Estructura s w i t c h
A.) Estructura i f
Este tipo de sentencias le permiten alterar la
secuencia normal de pasos de su programa en
base a la redacción de condiciones específicas.
Estructura i f - e l s e para toma
de decisiones
A la estructura if se le define una condición
para así bifurcar la secuencia del programa en
una de dos alternativas posibles. De la
siguiente manera:
a) Si se cumple la condición ejecutará las
sentencias1.
b) Si no se cumplen la condición, ejecutará
las
sentencias2.
Estructura Condicional y
Selectiva en Lenguaje C+++
Cada uno de los dos bloques de sentencias: el
bloque i f (si se cumple condición) y el bloque
e l s e (si no se cumple condición), tiene una
pareja de llaves de apertura-cierre { } para
indicar el inicio y final de las sentencias a
realizar en cada caso dentro de la estructura
condicional if.
Las condiciones a evaluar por una estructura
if puede ser de 2 tipos:
a) Simple
b) Compleja
Condición simple
se compara una variable con un valor o sino
con otra variable, gracias a los operadores
relacionales de C++ que son los siguientes:
condición compleja
permite evaluar 2 o más condiciones
simples como una sola evaluación
lógica, gracias
al uso de los operadores lógicos
condición compleja
permite evaluar 2 o más condiciones
simples como una sola evaluación
lógica, gracias
al uso de los operadores lógicos

Más contenido relacionado

Destacado

SER ANIMAL
SER ANIMALSER ANIMAL
SER ANIMAL
ebsc2013
 
#FIRMday 15th nov 2013 tom chesterton, tonic agency how being useful will m...
#FIRMday 15th nov 2013 tom chesterton, tonic agency   how being useful will m...#FIRMday 15th nov 2013 tom chesterton, tonic agency   how being useful will m...
#FIRMday 15th nov 2013 tom chesterton, tonic agency how being useful will m...Emma Mirrington
 
Tutorial miwi meneses2013
Tutorial miwi meneses2013Tutorial miwi meneses2013
Tutorial miwi meneses2013
gmeneses23
 
Evaluation Questionnaire results
Evaluation Questionnaire resultsEvaluation Questionnaire results
Evaluation Questionnaire results
AnnabelWright2597
 
Know god's solution
Know god's solutionKnow god's solution
Know god's solution
Grady Huggins
 
Know what you need to do
Know what you need to doKnow what you need to do
Know what you need to do
Grady Huggins
 
Informe de Gestión 2013
Informe  de   Gestión 2013 Informe  de   Gestión 2013
Informe de Gestión 2013 mairenauribe18
 
Focus interview
Focus interviewFocus interview
Focus interview
abbieshuttleworth1
 
Trans-disciplinary Institutional and Individual Capacity Building for One Hea...
Trans-disciplinary Institutional and Individual Capacity Building for One Hea...Trans-disciplinary Institutional and Individual Capacity Building for One Hea...
Trans-disciplinary Institutional and Individual Capacity Building for One Hea...
Global Risk Forum GRFDavos
 
すくすくスクラム 第43回 スクラムオーバービュー ~スクラム概要の絵を描きながら探求していこう!~
すくすくスクラム 第43回 スクラムオーバービュー~スクラム概要の絵を描きながら探求していこう!~すくすくスクラム 第43回 スクラムオーバービュー~スクラム概要の絵を描きながら探求していこう!~
すくすくスクラム 第43回 スクラムオーバービュー ~スクラム概要の絵を描きながら探求していこう!~Eiichiro Ogura
 
Opening scene analysis on kick ass (action)
Opening scene analysis on kick ass (action)Opening scene analysis on kick ass (action)
Opening scene analysis on kick ass (action)AshraProduction
 
Lyric analysis
Lyric analysis Lyric analysis
Lyric analysis
maxbranning
 
E- commerce: alcune case history eccellenti
E- commerce: alcune case history eccellentiE- commerce: alcune case history eccellenti
E- commerce: alcune case history eccellenti
Data For Business
 

Destacado (18)

GRUPO 8
GRUPO 8GRUPO 8
GRUPO 8
 
SER ANIMAL
SER ANIMALSER ANIMAL
SER ANIMAL
 
Presentación1 ana anaya_b.
Presentación1 ana anaya_b.Presentación1 ana anaya_b.
Presentación1 ana anaya_b.
 
nicoleregowebsite
nicoleregowebsitenicoleregowebsite
nicoleregowebsite
 
#FIRMday 15th nov 2013 tom chesterton, tonic agency how being useful will m...
#FIRMday 15th nov 2013 tom chesterton, tonic agency   how being useful will m...#FIRMday 15th nov 2013 tom chesterton, tonic agency   how being useful will m...
#FIRMday 15th nov 2013 tom chesterton, tonic agency how being useful will m...
 
Tutorial miwi meneses2013
Tutorial miwi meneses2013Tutorial miwi meneses2013
Tutorial miwi meneses2013
 
Blog
BlogBlog
Blog
 
Evaluation Questionnaire results
Evaluation Questionnaire resultsEvaluation Questionnaire results
Evaluation Questionnaire results
 
Know god's solution
Know god's solutionKnow god's solution
Know god's solution
 
Know what you need to do
Know what you need to doKnow what you need to do
Know what you need to do
 
Informe de Gestión 2013
Informe  de   Gestión 2013 Informe  de   Gestión 2013
Informe de Gestión 2013
 
V mware v-sphere & vsa presentation
V mware   v-sphere & vsa presentationV mware   v-sphere & vsa presentation
V mware v-sphere & vsa presentation
 
Focus interview
Focus interviewFocus interview
Focus interview
 
Trans-disciplinary Institutional and Individual Capacity Building for One Hea...
Trans-disciplinary Institutional and Individual Capacity Building for One Hea...Trans-disciplinary Institutional and Individual Capacity Building for One Hea...
Trans-disciplinary Institutional and Individual Capacity Building for One Hea...
 
すくすくスクラム 第43回 スクラムオーバービュー ~スクラム概要の絵を描きながら探求していこう!~
すくすくスクラム 第43回 スクラムオーバービュー~スクラム概要の絵を描きながら探求していこう!~すくすくスクラム 第43回 スクラムオーバービュー~スクラム概要の絵を描きながら探求していこう!~
すくすくスクラム 第43回 スクラムオーバービュー ~スクラム概要の絵を描きながら探求していこう!~
 
Opening scene analysis on kick ass (action)
Opening scene analysis on kick ass (action)Opening scene analysis on kick ass (action)
Opening scene analysis on kick ass (action)
 
Lyric analysis
Lyric analysis Lyric analysis
Lyric analysis
 
E- commerce: alcune case history eccellenti
E- commerce: alcune case history eccellentiE- commerce: alcune case history eccellenti
E- commerce: alcune case history eccellenti
 

Similar a progama en c

ESTRUCTURA CONDICIONALES
ESTRUCTURA CONDICIONALESESTRUCTURA CONDICIONALES
ESTRUCTURA CONDICIONALESkattylum2
 
Estructuras condicionales
Estructuras condicionalesEstructuras condicionales
Estructuras condicionalesjidje
 
ESTRUCTURAS CONDICIONALES
ESTRUCTURAS CONDICIONALESESTRUCTURAS CONDICIONALES
ESTRUCTURAS CONDICIONALESbryanapolo_
 
estructura condicional y selenctiva
estructura condicional y selenctivaestructura condicional y selenctiva
estructura condicional y selenctiva
k_tire cango
 
ESTRUCTURA DE CONTROL
ESTRUCTURA DE CONTROLESTRUCTURA DE CONTROL
ESTRUCTURA DE CONTROL
Fernando Solis
 
Comparacion lenguajes-de-programacion-c-y-cplusplus
Comparacion lenguajes-de-programacion-c-y-cplusplusComparacion lenguajes-de-programacion-c-y-cplusplus
Comparacion lenguajes-de-programacion-c-y-cplusplusAbefo
 
ESTRUCTURAS DE CONTROL.pdf
ESTRUCTURAS DE CONTROL.pdfESTRUCTURAS DE CONTROL.pdf
ESTRUCTURAS DE CONTROL.pdf
JavierAlexanderCarre
 
Estructura condicional en Lenguaje c+
Estructura condicional en Lenguaje c+Estructura condicional en Lenguaje c+
Estructura condicional en Lenguaje c+
Informatikos
 
Presentacion Jose Barazarte Estructuras Repetitivas.pptx
Presentacion Jose Barazarte Estructuras Repetitivas.pptxPresentacion Jose Barazarte Estructuras Repetitivas.pptx
Presentacion Jose Barazarte Estructuras Repetitivas.pptx
JoseBarazarte4
 
Estructuras de control
Estructuras de controlEstructuras de control
Estructuras de control
Lic_Vera
 
Estructuras de control
Estructuras de controlEstructuras de control
Estructuras de controlLed Zepp
 
Sentencia, secuencia y bloque
Sentencia, secuencia y bloqueSentencia, secuencia y bloque
Sentencia, secuencia y bloque
Tensor
 
Sentencia, secuencia y bloque
Sentencia, secuencia y bloqueSentencia, secuencia y bloque
Sentencia, secuencia y bloque
Tensor
 

Similar a progama en c (15)

ESTRUCTURA CONDICIONALES
ESTRUCTURA CONDICIONALESESTRUCTURA CONDICIONALES
ESTRUCTURA CONDICIONALES
 
Estructuras condicionales
Estructuras condicionalesEstructuras condicionales
Estructuras condicionales
 
ESTRUCTURAS CONDICIONALES
ESTRUCTURAS CONDICIONALESESTRUCTURAS CONDICIONALES
ESTRUCTURAS CONDICIONALES
 
estructura condicional y selenctiva
estructura condicional y selenctivaestructura condicional y selenctiva
estructura condicional y selenctiva
 
ESTRUCTURA DE CONTROL
ESTRUCTURA DE CONTROLESTRUCTURA DE CONTROL
ESTRUCTURA DE CONTROL
 
Comparacion lenguajes-de-programacion-c-y-cplusplus
Comparacion lenguajes-de-programacion-c-y-cplusplusComparacion lenguajes-de-programacion-c-y-cplusplus
Comparacion lenguajes-de-programacion-c-y-cplusplus
 
ESTRUCTURAS DE CONTROL.pdf
ESTRUCTURAS DE CONTROL.pdfESTRUCTURAS DE CONTROL.pdf
ESTRUCTURAS DE CONTROL.pdf
 
Estructura condicional en Lenguaje c+
Estructura condicional en Lenguaje c+Estructura condicional en Lenguaje c+
Estructura condicional en Lenguaje c+
 
Presentacion Jose Barazarte Estructuras Repetitivas.pptx
Presentacion Jose Barazarte Estructuras Repetitivas.pptxPresentacion Jose Barazarte Estructuras Repetitivas.pptx
Presentacion Jose Barazarte Estructuras Repetitivas.pptx
 
Unidad 2
Unidad 2Unidad 2
Unidad 2
 
Unidad 2
Unidad 2Unidad 2
Unidad 2
 
Estructuras de control
Estructuras de controlEstructuras de control
Estructuras de control
 
Estructuras de control
Estructuras de controlEstructuras de control
Estructuras de control
 
Sentencia, secuencia y bloque
Sentencia, secuencia y bloqueSentencia, secuencia y bloque
Sentencia, secuencia y bloque
 
Sentencia, secuencia y bloque
Sentencia, secuencia y bloqueSentencia, secuencia y bloque
Sentencia, secuencia y bloque
 

Último

UNA VISITA A SAN PEDRO EN EL VATICANO.pdf
UNA VISITA A SAN PEDRO EN EL VATICANO.pdfUNA VISITA A SAN PEDRO EN EL VATICANO.pdf
UNA VISITA A SAN PEDRO EN EL VATICANO.pdf
Joan Ribes Gallén
 
Aprender-IA: Recursos online gratuitos para estar al tanto y familiarizarse c...
Aprender-IA: Recursos online gratuitos para estar al tanto y familiarizarse c...Aprender-IA: Recursos online gratuitos para estar al tanto y familiarizarse c...
Aprender-IA: Recursos online gratuitos para estar al tanto y familiarizarse c...
María Sánchez González (@cibermarikiya)
 
Sesión: El espiritismo desenmascarado.pdf
Sesión: El espiritismo desenmascarado.pdfSesión: El espiritismo desenmascarado.pdf
Sesión: El espiritismo desenmascarado.pdf
https://gramadal.wordpress.com/
 
Nuevos espacios,nuevos tiempos,nuevas practica.pptx
Nuevos espacios,nuevos tiempos,nuevas practica.pptxNuevos espacios,nuevos tiempos,nuevas practica.pptx
Nuevos espacios,nuevos tiempos,nuevas practica.pptx
lautyzaracho4
 
teorema de pitagorasparalaeducacion.pptx
teorema de pitagorasparalaeducacion.pptxteorema de pitagorasparalaeducacion.pptx
teorema de pitagorasparalaeducacion.pptx
ElzebirQuiroga
 
el pensamiento critico de paulo freire en basica .pdf
el pensamiento critico de paulo freire en basica .pdfel pensamiento critico de paulo freire en basica .pdf
el pensamiento critico de paulo freire en basica .pdf
almitamtz00
 
EVALUACION ESTUDIANTIL 2023-2024 Ecuador - Costa.pptx
EVALUACION ESTUDIANTIL 2023-2024 Ecuador - Costa.pptxEVALUACION ESTUDIANTIL 2023-2024 Ecuador - Costa.pptx
EVALUACION ESTUDIANTIL 2023-2024 Ecuador - Costa.pptx
Victor Elizalde P
 
Examen de Lengua Castellana y Literatura de la EBAU en Castilla-La Mancha 2024.
Examen de Lengua Castellana y Literatura de la EBAU en Castilla-La Mancha 2024.Examen de Lengua Castellana y Literatura de la EBAU en Castilla-La Mancha 2024.
Examen de Lengua Castellana y Literatura de la EBAU en Castilla-La Mancha 2024.
20minutos
 
Examen de la EvAU 2024 en Navarra Latín.
Examen de la EvAU 2024 en Navarra Latín.Examen de la EvAU 2024 en Navarra Latín.
Examen de la EvAU 2024 en Navarra Latín.
amayaltc18
 
Inteligencia Artificial para Docentes HIA Ccesa007.pdf
Inteligencia Artificial para Docentes  HIA  Ccesa007.pdfInteligencia Artificial para Docentes  HIA  Ccesa007.pdf
Inteligencia Artificial para Docentes HIA Ccesa007.pdf
Demetrio Ccesa Rayme
 
665033394-TODAS-LAS-SANGRES-resumen-Por-Capitulos.pdf
665033394-TODAS-LAS-SANGRES-resumen-Por-Capitulos.pdf665033394-TODAS-LAS-SANGRES-resumen-Por-Capitulos.pdf
665033394-TODAS-LAS-SANGRES-resumen-Por-Capitulos.pdf
valerytorresmendizab
 
Examen de Selectividad. Geografía junio 2024 (Convocatoria Ordinaria). UCLM
Examen de Selectividad. Geografía junio 2024 (Convocatoria Ordinaria). UCLMExamen de Selectividad. Geografía junio 2024 (Convocatoria Ordinaria). UCLM
Examen de Selectividad. Geografía junio 2024 (Convocatoria Ordinaria). UCLM
Juan Martín Martín
 
PLAN DE CAPACITACION xxxxxxxxxxxxxxxxxxx
PLAN DE CAPACITACION xxxxxxxxxxxxxxxxxxxPLAN DE CAPACITACION xxxxxxxxxxxxxxxxxxx
PLAN DE CAPACITACION xxxxxxxxxxxxxxxxxxx
cportizsanchez48
 
SEMIOLOGIA DE HEMORRAGIAS DIGESTIVAS.pptx
SEMIOLOGIA DE HEMORRAGIAS DIGESTIVAS.pptxSEMIOLOGIA DE HEMORRAGIAS DIGESTIVAS.pptx
SEMIOLOGIA DE HEMORRAGIAS DIGESTIVAS.pptx
Osiris Urbano
 
El espiritismo desenmascarado.pdf. Lec. 10
El espiritismo desenmascarado.pdf. Lec. 10El espiritismo desenmascarado.pdf. Lec. 10
El espiritismo desenmascarado.pdf. Lec. 10
Alejandrino Halire Ccahuana
 
ROMPECABEZAS DE ECUACIONES DE PRIMER GRADO OLIMPIADA DE PARÍS 2024. Por JAVIE...
ROMPECABEZAS DE ECUACIONES DE PRIMER GRADO OLIMPIADA DE PARÍS 2024. Por JAVIE...ROMPECABEZAS DE ECUACIONES DE PRIMER GRADO OLIMPIADA DE PARÍS 2024. Por JAVIE...
ROMPECABEZAS DE ECUACIONES DE PRIMER GRADO OLIMPIADA DE PARÍS 2024. Por JAVIE...
JAVIER SOLIS NOYOLA
 
Las diversas Sociedades Mercantiles Mexico.pdf
Las diversas Sociedades Mercantiles Mexico.pdfLas diversas Sociedades Mercantiles Mexico.pdf
Las diversas Sociedades Mercantiles Mexico.pdf
La Paradoja educativa
 
FUENTES DE LA CULTURA GRIEGA EN LA HISTORIA
FUENTES DE LA CULTURA GRIEGA EN LA HISTORIAFUENTES DE LA CULTURA GRIEGA EN LA HISTORIA
FUENTES DE LA CULTURA GRIEGA EN LA HISTORIA
ElenaGallardoPals
 
Biografía de Gregor Mendel y sus 3 leyes.pptx
Biografía de Gregor Mendel y sus 3 leyes.pptxBiografía de Gregor Mendel y sus 3 leyes.pptx
Biografía de Gregor Mendel y sus 3 leyes.pptx
ar5498718
 
Mauricio-Presentación-Vacacional- 2024-1
Mauricio-Presentación-Vacacional- 2024-1Mauricio-Presentación-Vacacional- 2024-1
Mauricio-Presentación-Vacacional- 2024-1
MauricioSnchez83
 

Último (20)

UNA VISITA A SAN PEDRO EN EL VATICANO.pdf
UNA VISITA A SAN PEDRO EN EL VATICANO.pdfUNA VISITA A SAN PEDRO EN EL VATICANO.pdf
UNA VISITA A SAN PEDRO EN EL VATICANO.pdf
 
Aprender-IA: Recursos online gratuitos para estar al tanto y familiarizarse c...
Aprender-IA: Recursos online gratuitos para estar al tanto y familiarizarse c...Aprender-IA: Recursos online gratuitos para estar al tanto y familiarizarse c...
Aprender-IA: Recursos online gratuitos para estar al tanto y familiarizarse c...
 
Sesión: El espiritismo desenmascarado.pdf
Sesión: El espiritismo desenmascarado.pdfSesión: El espiritismo desenmascarado.pdf
Sesión: El espiritismo desenmascarado.pdf
 
Nuevos espacios,nuevos tiempos,nuevas practica.pptx
Nuevos espacios,nuevos tiempos,nuevas practica.pptxNuevos espacios,nuevos tiempos,nuevas practica.pptx
Nuevos espacios,nuevos tiempos,nuevas practica.pptx
 
teorema de pitagorasparalaeducacion.pptx
teorema de pitagorasparalaeducacion.pptxteorema de pitagorasparalaeducacion.pptx
teorema de pitagorasparalaeducacion.pptx
 
el pensamiento critico de paulo freire en basica .pdf
el pensamiento critico de paulo freire en basica .pdfel pensamiento critico de paulo freire en basica .pdf
el pensamiento critico de paulo freire en basica .pdf
 
EVALUACION ESTUDIANTIL 2023-2024 Ecuador - Costa.pptx
EVALUACION ESTUDIANTIL 2023-2024 Ecuador - Costa.pptxEVALUACION ESTUDIANTIL 2023-2024 Ecuador - Costa.pptx
EVALUACION ESTUDIANTIL 2023-2024 Ecuador - Costa.pptx
 
Examen de Lengua Castellana y Literatura de la EBAU en Castilla-La Mancha 2024.
Examen de Lengua Castellana y Literatura de la EBAU en Castilla-La Mancha 2024.Examen de Lengua Castellana y Literatura de la EBAU en Castilla-La Mancha 2024.
Examen de Lengua Castellana y Literatura de la EBAU en Castilla-La Mancha 2024.
 
Examen de la EvAU 2024 en Navarra Latín.
Examen de la EvAU 2024 en Navarra Latín.Examen de la EvAU 2024 en Navarra Latín.
Examen de la EvAU 2024 en Navarra Latín.
 
Inteligencia Artificial para Docentes HIA Ccesa007.pdf
Inteligencia Artificial para Docentes  HIA  Ccesa007.pdfInteligencia Artificial para Docentes  HIA  Ccesa007.pdf
Inteligencia Artificial para Docentes HIA Ccesa007.pdf
 
665033394-TODAS-LAS-SANGRES-resumen-Por-Capitulos.pdf
665033394-TODAS-LAS-SANGRES-resumen-Por-Capitulos.pdf665033394-TODAS-LAS-SANGRES-resumen-Por-Capitulos.pdf
665033394-TODAS-LAS-SANGRES-resumen-Por-Capitulos.pdf
 
Examen de Selectividad. Geografía junio 2024 (Convocatoria Ordinaria). UCLM
Examen de Selectividad. Geografía junio 2024 (Convocatoria Ordinaria). UCLMExamen de Selectividad. Geografía junio 2024 (Convocatoria Ordinaria). UCLM
Examen de Selectividad. Geografía junio 2024 (Convocatoria Ordinaria). UCLM
 
PLAN DE CAPACITACION xxxxxxxxxxxxxxxxxxx
PLAN DE CAPACITACION xxxxxxxxxxxxxxxxxxxPLAN DE CAPACITACION xxxxxxxxxxxxxxxxxxx
PLAN DE CAPACITACION xxxxxxxxxxxxxxxxxxx
 
SEMIOLOGIA DE HEMORRAGIAS DIGESTIVAS.pptx
SEMIOLOGIA DE HEMORRAGIAS DIGESTIVAS.pptxSEMIOLOGIA DE HEMORRAGIAS DIGESTIVAS.pptx
SEMIOLOGIA DE HEMORRAGIAS DIGESTIVAS.pptx
 
El espiritismo desenmascarado.pdf. Lec. 10
El espiritismo desenmascarado.pdf. Lec. 10El espiritismo desenmascarado.pdf. Lec. 10
El espiritismo desenmascarado.pdf. Lec. 10
 
ROMPECABEZAS DE ECUACIONES DE PRIMER GRADO OLIMPIADA DE PARÍS 2024. Por JAVIE...
ROMPECABEZAS DE ECUACIONES DE PRIMER GRADO OLIMPIADA DE PARÍS 2024. Por JAVIE...ROMPECABEZAS DE ECUACIONES DE PRIMER GRADO OLIMPIADA DE PARÍS 2024. Por JAVIE...
ROMPECABEZAS DE ECUACIONES DE PRIMER GRADO OLIMPIADA DE PARÍS 2024. Por JAVIE...
 
Las diversas Sociedades Mercantiles Mexico.pdf
Las diversas Sociedades Mercantiles Mexico.pdfLas diversas Sociedades Mercantiles Mexico.pdf
Las diversas Sociedades Mercantiles Mexico.pdf
 
FUENTES DE LA CULTURA GRIEGA EN LA HISTORIA
FUENTES DE LA CULTURA GRIEGA EN LA HISTORIAFUENTES DE LA CULTURA GRIEGA EN LA HISTORIA
FUENTES DE LA CULTURA GRIEGA EN LA HISTORIA
 
Biografía de Gregor Mendel y sus 3 leyes.pptx
Biografía de Gregor Mendel y sus 3 leyes.pptxBiografía de Gregor Mendel y sus 3 leyes.pptx
Biografía de Gregor Mendel y sus 3 leyes.pptx
 
Mauricio-Presentación-Vacacional- 2024-1
Mauricio-Presentación-Vacacional- 2024-1Mauricio-Presentación-Vacacional- 2024-1
Mauricio-Presentación-Vacacional- 2024-1
 

progama en c

  • 1.
  • 2. La Toma de decisiones en Lenguaje C Con el lenguaje C++ puede tomar decisiones gracias a 2 estructuras: B). Estructura s w i t c h A.) Estructura i f Este tipo de sentencias le permiten alterar la secuencia normal de pasos de su programa en base a la redacción de condiciones específicas.
  • 3. Estructura i f - e l s e para toma de decisiones A la estructura if se le define una condición para así bifurcar la secuencia del programa en una de dos alternativas posibles. De la siguiente manera: a) Si se cumple la condición ejecutará las sentencias1. b) Si no se cumplen la condición, ejecutará las sentencias2.
  • 4. Estructura Condicional y Selectiva en Lenguaje C+++ Cada uno de los dos bloques de sentencias: el bloque i f (si se cumple condición) y el bloque e l s e (si no se cumple condición), tiene una pareja de llaves de apertura-cierre { } para indicar el inicio y final de las sentencias a realizar en cada caso dentro de la estructura condicional if. Las condiciones a evaluar por una estructura if puede ser de 2 tipos: a) Simple b) Compleja
  • 5. Condición simple se compara una variable con un valor o sino con otra variable, gracias a los operadores relacionales de C++ que son los siguientes:
  • 6. condición compleja permite evaluar 2 o más condiciones simples como una sola evaluación lógica, gracias al uso de los operadores lógicos
  • 7. condición compleja permite evaluar 2 o más condiciones simples como una sola evaluación lógica, gracias al uso de los operadores lógicos