SlideShare a Scribd company logo
1 of 1
INSTITUTO DE EDUCACION SUPE R I O R
TECNOLOGICO PÚBL I C O
“JOSÉ DOMINGO CHOQ U E H U A N CA ”
Programa de Estudios: Computación e Informática
Trabajo Encargado de Taller de Programación Web
Tema: Estructuras Condicionales
Nota: El presente trabajo, deberá ser presentado en virtual y en archivo Word o PDF. Para la codificación utilice
el lenguaje de programación PHP.
APLICACIONES CON ESTRUCTURAS CONDICIONALES SIMPLES, DOBLES Y ANIDADAS (EN
PHP UTILICE IF, ELSE, ELSE IF)
1. Determinar si un número entero es positivo, negativo o neutro
2. Determinar si un número es múltiplo de 3 y 5
3. Determinar si un número entero es par o impar
4. Dado tres números entero devolver el mayor y el menor número
5. Dado un número devolver el doble si el número no es par, caso contrario el triple
6. Dado tres números devolver los números en orden ascendente
7. Dado la hora, minuto y segundo, encuentre la hora del siguiente segundo.
8. Dado los siguientes datos de entrada: Saldo anterior, Tipo de Movimiento R (Retiro) o D (Depósito) y Monto
de la transacción, obtener como dato de Salida el Saldo actual.
9. Un restaurante ofrece un descuento del 10% para consumo de hasta S/. 100.00 y un descuento de 20% para
consumos mayores, para ambos casos se aplica un impuesto del 19%. Determinar el monto del descuento,
el impuesto y el importe a pagar.
10. Un negocio tiene dos tipos de cliente, cliente general (G) o cliente afiliado (A), recibe dos formas de pago: al
contado (C) o en plazos (P), se pide que al ingresar el monto de la compra se obtenga el monto del descuento
o el monto del recargo y el total a pagar según la siguiente tabla.
Tipo
Contado (C)
Descuento
Plazos(P)
Recargo
Cliente general (G) 15% 10%
Cliente afiliado (A) 20% 5%
11. Elabore un algoritmo que obtenga las raíces reales de una ecuación de segundo grado.
ax2 + bx + c = 0
𝑥 =
−�± √�
2 −
4�
�
2�
Considerar que a≠0 para poder dividir y que b2 – 4ac ≥0, para obtener la raíz cuadrada
12. Aplicación que permita determinar el Monto total a pagar por la compra de mercadería adquirida
considerando la siguiente tabla.
Mercadería
Adquirida S/.
Descuento %
< 500
500 a 799
800 a 999
1000
>1000
0
5
10
11
15

More Related Content

Similar to Ejercicicios de estructura condicional

Year 2 dsa c++ exercises on user defined functions
Year 2 dsa  c++ exercises on user defined functionsYear 2 dsa  c++ exercises on user defined functions
Year 2 dsa c++ exercises on user defined functionsErnesteNtezirizaza
 
Cs8261 cp lab syllabus
Cs8261 cp lab syllabusCs8261 cp lab syllabus
Cs8261 cp lab syllabusPalani Chamy
 
c++ Question
c++  Questionc++  Question
c++ QuestionHamza4467
 
BUS 640 Become Exceptional--bus640.com
 BUS 640 Become Exceptional--bus640.com BUS 640 Become Exceptional--bus640.com
BUS 640 Become Exceptional--bus640.comclaric129
 
BUS 640 Remember Education--bus640.com
BUS 640 Remember Education--bus640.comBUS 640 Remember Education--bus640.com
BUS 640 Remember Education--bus640.comchrysanthemu65
 
BUS 640 Inspiring Innovation -- bus640.com
BUS 640 Inspiring Innovation -- bus640.comBUS 640 Inspiring Innovation -- bus640.com
BUS 640 Inspiring Innovation -- bus640.comkopiko103
 
BUS 640 Education Planning--bus640.com
BUS 640 Education Planning--bus640.comBUS 640 Education Planning--bus640.com
BUS 640 Education Planning--bus640.comWindyMiller43
 
BUS 640 Introduction Education--bus640.com
BUS 640 Introduction Education--bus640.comBUS 640 Introduction Education--bus640.com
BUS 640 Introduction Education--bus640.comkopiko222
 
BUS 640 Education for Service--bus640.com
BUS 640 Education for Service--bus640.comBUS 640 Education for Service--bus640.com
BUS 640 Education for Service--bus640.comwilliamwordsworth9
 
BUS 640 Achievement Education--bus640.com
BUS 640 Achievement Education--bus640.comBUS 640 Achievement Education--bus640.com
BUS 640 Achievement Education--bus640.comagathachristie168
 
BUS 640 Redefined Education--bus640.com
BUS 640 Redefined Education--bus640.comBUS 640 Redefined Education--bus640.com
BUS 640 Redefined Education--bus640.comagathachristie206
 
BUS 640 Education Counseling--bus640.com
BUS 640 Education Counseling--bus640.comBUS 640 Education Counseling--bus640.com
BUS 640 Education Counseling--bus640.comclaric58
 

Similar to Ejercicicios de estructura condicional (13)

I PUC CS Lab_programs
I PUC CS Lab_programsI PUC CS Lab_programs
I PUC CS Lab_programs
 
Year 2 dsa c++ exercises on user defined functions
Year 2 dsa  c++ exercises on user defined functionsYear 2 dsa  c++ exercises on user defined functions
Year 2 dsa c++ exercises on user defined functions
 
Cs8261 cp lab syllabus
Cs8261 cp lab syllabusCs8261 cp lab syllabus
Cs8261 cp lab syllabus
 
c++ Question
c++  Questionc++  Question
c++ Question
 
BUS 640 Become Exceptional--bus640.com
 BUS 640 Become Exceptional--bus640.com BUS 640 Become Exceptional--bus640.com
BUS 640 Become Exceptional--bus640.com
 
BUS 640 Remember Education--bus640.com
BUS 640 Remember Education--bus640.comBUS 640 Remember Education--bus640.com
BUS 640 Remember Education--bus640.com
 
BUS 640 Inspiring Innovation -- bus640.com
BUS 640 Inspiring Innovation -- bus640.comBUS 640 Inspiring Innovation -- bus640.com
BUS 640 Inspiring Innovation -- bus640.com
 
BUS 640 Education Planning--bus640.com
BUS 640 Education Planning--bus640.comBUS 640 Education Planning--bus640.com
BUS 640 Education Planning--bus640.com
 
BUS 640 Introduction Education--bus640.com
BUS 640 Introduction Education--bus640.comBUS 640 Introduction Education--bus640.com
BUS 640 Introduction Education--bus640.com
 
BUS 640 Education for Service--bus640.com
BUS 640 Education for Service--bus640.comBUS 640 Education for Service--bus640.com
BUS 640 Education for Service--bus640.com
 
BUS 640 Achievement Education--bus640.com
BUS 640 Achievement Education--bus640.comBUS 640 Achievement Education--bus640.com
BUS 640 Achievement Education--bus640.com
 
BUS 640 Redefined Education--bus640.com
BUS 640 Redefined Education--bus640.comBUS 640 Redefined Education--bus640.com
BUS 640 Redefined Education--bus640.com
 
BUS 640 Education Counseling--bus640.com
BUS 640 Education Counseling--bus640.comBUS 640 Education Counseling--bus640.com
BUS 640 Education Counseling--bus640.com
 

Recently uploaded

Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...home
 
FULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | DelhiFULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | DelhiSaketCallGirlsCallUs
 
Moradabad Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service Available
Moradabad Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service AvailableMoradabad Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service Available
Moradabad Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service AvailableNitya salvi
 
Jeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around EuropeJeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around EuropeJeremy Casson
 
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | DelhiFULL NIGHT — 9999894380 Call Girls In Ashok Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | DelhiSaketCallGirlsCallUs
 
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112Nitya salvi
 
Bobbie goods coloring book 81 pag_240127_163802.pdf
Bobbie goods coloring book 81 pag_240127_163802.pdfBobbie goods coloring book 81 pag_240127_163802.pdf
Bobbie goods coloring book 81 pag_240127_163802.pdfMARIBEL442158
 
FULL NIGHT — 9999894380 Call Girls In Patel Nagar | Delhi
FULL NIGHT — 9999894380 Call Girls In Patel Nagar | DelhiFULL NIGHT — 9999894380 Call Girls In Patel Nagar | Delhi
FULL NIGHT — 9999894380 Call Girls In Patel Nagar | DelhiSaketCallGirlsCallUs
 
Editorial sephora annual report design project
Editorial sephora annual report design projectEditorial sephora annual report design project
Editorial sephora annual report design projecttbatkhuu1
 
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Servicesonnydelhi1992
 
Sirmaur Call Girls Book Now 8617697112 Top Class Pondicherry Escort Service A...
Sirmaur Call Girls Book Now 8617697112 Top Class Pondicherry Escort Service A...Sirmaur Call Girls Book Now 8617697112 Top Class Pondicherry Escort Service A...
Sirmaur Call Girls Book Now 8617697112 Top Class Pondicherry Escort Service A...Nitya salvi
 
FULL NIGHT — 9999894380 Call Girls In Mahipalpur | Delhi
FULL NIGHT — 9999894380 Call Girls In Mahipalpur | DelhiFULL NIGHT — 9999894380 Call Girls In Mahipalpur | Delhi
FULL NIGHT — 9999894380 Call Girls In Mahipalpur | DelhiSaketCallGirlsCallUs
 
FULL NIGHT — 9999894380 Call Girls In Delhi | Delhi
FULL NIGHT — 9999894380 Call Girls In Delhi | DelhiFULL NIGHT — 9999894380 Call Girls In Delhi | Delhi
FULL NIGHT — 9999894380 Call Girls In Delhi | DelhiSaketCallGirlsCallUs
 
Akbar Religious Policy and Sufism comparison.pptx
Akbar Religious Policy and Sufism comparison.pptxAkbar Religious Policy and Sufism comparison.pptx
Akbar Religious Policy and Sufism comparison.pptxAmita Gupta
 
Completed Event Presentation for Huma 1305
Completed Event Presentation for Huma 1305Completed Event Presentation for Huma 1305
Completed Event Presentation for Huma 1305jazlynjacobs51
 
AaliyahBell_themist_v01.pdf .
AaliyahBell_themist_v01.pdf             .AaliyahBell_themist_v01.pdf             .
AaliyahBell_themist_v01.pdf .AaliyahB2
 

Recently uploaded (20)

Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
Authentic # 00971556872006 # Hot Call Girls Service in Dubai By International...
 
(INDIRA) Call Girl Jammu Call Now 8617697112 Jammu Escorts 24x7
(INDIRA) Call Girl Jammu Call Now 8617697112 Jammu Escorts 24x7(INDIRA) Call Girl Jammu Call Now 8617697112 Jammu Escorts 24x7
(INDIRA) Call Girl Jammu Call Now 8617697112 Jammu Escorts 24x7
 
FULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | DelhiFULL NIGHT — 9999894380 Call Girls In Saket | Delhi
FULL NIGHT — 9999894380 Call Girls In Saket | Delhi
 
Moradabad Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service Available
Moradabad Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service AvailableMoradabad Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service Available
Moradabad Call Girls - 📞 8617697112 🔝 Top Class Call Girls Service Available
 
Jeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around EuropeJeremy Casson - An Architectural and Historical Journey Around Europe
Jeremy Casson - An Architectural and Historical Journey Around Europe
 
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | DelhiFULL NIGHT — 9999894380 Call Girls In Ashok Vihar | Delhi
FULL NIGHT — 9999894380 Call Girls In Ashok Vihar | Delhi
 
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112
VIP Ramnagar Call Girls, Ramnagar escorts Girls 📞 8617697112
 
Bobbie goods coloring book 81 pag_240127_163802.pdf
Bobbie goods coloring book 81 pag_240127_163802.pdfBobbie goods coloring book 81 pag_240127_163802.pdf
Bobbie goods coloring book 81 pag_240127_163802.pdf
 
FULL NIGHT — 9999894380 Call Girls In Patel Nagar | Delhi
FULL NIGHT — 9999894380 Call Girls In Patel Nagar | DelhiFULL NIGHT — 9999894380 Call Girls In Patel Nagar | Delhi
FULL NIGHT — 9999894380 Call Girls In Patel Nagar | Delhi
 
Editorial sephora annual report design project
Editorial sephora annual report design projectEditorial sephora annual report design project
Editorial sephora annual report design project
 
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Uttam Nagar Delhi >༒9667401043 Escort Service
 
Sirmaur Call Girls Book Now 8617697112 Top Class Pondicherry Escort Service A...
Sirmaur Call Girls Book Now 8617697112 Top Class Pondicherry Escort Service A...Sirmaur Call Girls Book Now 8617697112 Top Class Pondicherry Escort Service A...
Sirmaur Call Girls Book Now 8617697112 Top Class Pondicherry Escort Service A...
 
FULL NIGHT — 9999894380 Call Girls In Mahipalpur | Delhi
FULL NIGHT — 9999894380 Call Girls In Mahipalpur | DelhiFULL NIGHT — 9999894380 Call Girls In Mahipalpur | Delhi
FULL NIGHT — 9999894380 Call Girls In Mahipalpur | Delhi
 
FULL NIGHT — 9999894380 Call Girls In Delhi | Delhi
FULL NIGHT — 9999894380 Call Girls In Delhi | DelhiFULL NIGHT — 9999894380 Call Girls In Delhi | Delhi
FULL NIGHT — 9999894380 Call Girls In Delhi | Delhi
 
UAE Call Girls # 0528675665 # Independent Call Girls In Dubai ~ (UAE)
UAE Call Girls # 0528675665 # Independent Call Girls In Dubai ~ (UAE)UAE Call Girls # 0528675665 # Independent Call Girls In Dubai ~ (UAE)
UAE Call Girls # 0528675665 # Independent Call Girls In Dubai ~ (UAE)
 
Akbar Religious Policy and Sufism comparison.pptx
Akbar Religious Policy and Sufism comparison.pptxAkbar Religious Policy and Sufism comparison.pptx
Akbar Religious Policy and Sufism comparison.pptx
 
UAE Call Girls # 971526940039 # Independent Call Girls In Dubai # (UAE)
UAE Call Girls # 971526940039 # Independent Call Girls In Dubai # (UAE)UAE Call Girls # 971526940039 # Independent Call Girls In Dubai # (UAE)
UAE Call Girls # 971526940039 # Independent Call Girls In Dubai # (UAE)
 
Completed Event Presentation for Huma 1305
Completed Event Presentation for Huma 1305Completed Event Presentation for Huma 1305
Completed Event Presentation for Huma 1305
 
(INDIRA) Call Girl Dehradun Call Now 8617697112 Dehradun Escorts 24x7
(INDIRA) Call Girl Dehradun Call Now 8617697112 Dehradun Escorts 24x7(INDIRA) Call Girl Dehradun Call Now 8617697112 Dehradun Escorts 24x7
(INDIRA) Call Girl Dehradun Call Now 8617697112 Dehradun Escorts 24x7
 
AaliyahBell_themist_v01.pdf .
AaliyahBell_themist_v01.pdf             .AaliyahBell_themist_v01.pdf             .
AaliyahBell_themist_v01.pdf .
 

Ejercicicios de estructura condicional

  • 1. INSTITUTO DE EDUCACION SUPE R I O R TECNOLOGICO PÚBL I C O “JOSÉ DOMINGO CHOQ U E H U A N CA ” Programa de Estudios: Computación e Informática Trabajo Encargado de Taller de Programación Web Tema: Estructuras Condicionales Nota: El presente trabajo, deberá ser presentado en virtual y en archivo Word o PDF. Para la codificación utilice el lenguaje de programación PHP. APLICACIONES CON ESTRUCTURAS CONDICIONALES SIMPLES, DOBLES Y ANIDADAS (EN PHP UTILICE IF, ELSE, ELSE IF) 1. Determinar si un número entero es positivo, negativo o neutro 2. Determinar si un número es múltiplo de 3 y 5 3. Determinar si un número entero es par o impar 4. Dado tres números entero devolver el mayor y el menor número 5. Dado un número devolver el doble si el número no es par, caso contrario el triple 6. Dado tres números devolver los números en orden ascendente 7. Dado la hora, minuto y segundo, encuentre la hora del siguiente segundo. 8. Dado los siguientes datos de entrada: Saldo anterior, Tipo de Movimiento R (Retiro) o D (Depósito) y Monto de la transacción, obtener como dato de Salida el Saldo actual. 9. Un restaurante ofrece un descuento del 10% para consumo de hasta S/. 100.00 y un descuento de 20% para consumos mayores, para ambos casos se aplica un impuesto del 19%. Determinar el monto del descuento, el impuesto y el importe a pagar. 10. Un negocio tiene dos tipos de cliente, cliente general (G) o cliente afiliado (A), recibe dos formas de pago: al contado (C) o en plazos (P), se pide que al ingresar el monto de la compra se obtenga el monto del descuento o el monto del recargo y el total a pagar según la siguiente tabla. Tipo Contado (C) Descuento Plazos(P) Recargo Cliente general (G) 15% 10% Cliente afiliado (A) 20% 5% 11. Elabore un algoritmo que obtenga las raíces reales de una ecuación de segundo grado. ax2 + bx + c = 0 𝑥 = −�± √� 2 − 4� � 2� Considerar que a≠0 para poder dividir y que b2 – 4ac ≥0, para obtener la raíz cuadrada 12. Aplicación que permita determinar el Monto total a pagar por la compra de mercadería adquirida considerando la siguiente tabla. Mercadería Adquirida S/. Descuento % < 500 500 a 799 800 a 999 1000 >1000 0 5 10 11 15