SlideShare una empresa de Scribd logo
1 de 5
intdias,mes,año,n = 0;
Console.WriteLine("ingreseel dia");
dias= Convert.ToInt32(Console.ReadLine());
Console.WriteLine("ingreseel mes");
mes= Convert.ToInt32(Console.ReadLine());
Console.WriteLine("ingreseel año");
año = Convert.ToInt32(Console.ReadLine());
if (año% 4 == 0 && (año% 100 != 0 ||año % 400 == 0))
{
switch(mes)
{
case 1:
n = dias;
break;
case 2:
n = 31 + dias;
break;
case 3:
n = 59 + dias;
break;
case 4:
n = 90 + dias;
break;
case 5:
n = 120 + dias;
break;
case 6:
n = 151 + dias;
break;
case 7:
n = 181 + dias;
break;
case 8:
n = 212 + dias;
break;
case 9:
n = 243 + dias;
break;
case 10:
n = 273 + dias;
break;
case 11:
n = 304 + dias;
break;
case 12:
n = 334 + dias;
break;
}
}
else
switch(mes)
{
case 1:
n = dias;
break;
case 2:
n = 31 + dias;
break;
case 3:
n = 59 + dias;
break;
case 4:
n = 90 + dias;
break;
case 5:
n = 120 + dias;
break;
case 6:
n = 151 + dias;
break;
case 7:
n = 181 + dias;
break;
case 8:
n = 212 + dias;
break;
case 9:
n = 243 + dias;
break;
case 10:
n = 273 + dias;
break;
case 11:
n = 304 + dias;
break;
case 12:
n = 334 + dias;
break;
}
Console.WriteLine("el numero de diases"+ n + " del año" + año);
Console.Read();
inti, n,edad,hombres_mayores=0,hombres= 0, mujeres=0;
double promedio_total,promedio_mujeres,suma_edades=0,suma_edad_hombres=0,
suma_edad_mujeres=0;
char sexo;
Console.WriteLine("ingrese el numerode alumnos:");
n = Convert.ToInt32(Console.ReadLine());
for(i=1;i<=n; i++)
{
Console.WriteLine("ingrese el sexodel alumno:"+i);
sexo= Convert.ToChar(Console.ReadLine());
switch(sexo)
{
case 'H':
do
{
Console.WriteLine("ingreselaedaddel alumno:"+i);
edad=Convert.ToInt32(Console.ReadLine());
}
while((edad>25)||( edad<15));
suma_edad_hombres=suma_edad_hombres+edad;
hombres= hombres+ 1;
if (edad>= 18)
hombres_mayores=hombres_mayores+1;
break;
case'M':
do
{
Console.WriteLine("ingreselaedaddel alumno:"+i);
edad= Convert.ToInt32(Console.ReadLine());
}
while ((edad>25) ||(edad<15));
mujeres= mujeres+1;
break;
}
}
suma_edades=suma_edad_hombres+suma_edad_mujeres;
promedio_total =suma_edades/n;
promedio_mujeres=suma_edad_mujeres/mujeres;
Console.WriteLine("cantidadde hombres mayoresde edad:"+hombres_mayores);
Console.WriteLine("edadpromediode las mujeres:"+promedio_mujeres);
Console.WriteLine("edadpromediototal:"+promedio_total);
Console.Read();

Más contenido relacionado

Último

PPT ELABORARACION DE ADOBES 2023 (1).pdf
PPT ELABORARACION DE ADOBES 2023 (1).pdfPPT ELABORARACION DE ADOBES 2023 (1).pdf
PPT ELABORARACION DE ADOBES 2023 (1).pdfalexquispenieto2
 
Sesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO CersaSesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO CersaXimenaFallaLecca1
 
Curso intensivo de soldadura electrónica en pdf
Curso intensivo de soldadura electrónica  en pdfCurso intensivo de soldadura electrónica  en pdf
Curso intensivo de soldadura electrónica en pdfFernandaGarca788912
 
Manual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdfManual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdfedsonzav8
 
¿QUE SON LOS AGENTES FISICOS Y QUE CUIDADOS TENER.pptx
¿QUE SON LOS AGENTES FISICOS Y QUE CUIDADOS TENER.pptx¿QUE SON LOS AGENTES FISICOS Y QUE CUIDADOS TENER.pptx
¿QUE SON LOS AGENTES FISICOS Y QUE CUIDADOS TENER.pptxguillermosantana15
 
nom-028-stps-2012-nom-028-stps-2012-.pdf
nom-028-stps-2012-nom-028-stps-2012-.pdfnom-028-stps-2012-nom-028-stps-2012-.pdf
nom-028-stps-2012-nom-028-stps-2012-.pdfDiegoMadrigal21
 
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIAS
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIASTEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIAS
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIASfranzEmersonMAMANIOC
 
CLASe número 4 fotogrametria Y PARALAJE.pptx
CLASe número 4 fotogrametria Y PARALAJE.pptxCLASe número 4 fotogrametria Y PARALAJE.pptx
CLASe número 4 fotogrametria Y PARALAJE.pptxbingoscarlet
 
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
 
07 MECANIZADO DE CONTORNOS para torno cnc universidad catolica
07 MECANIZADO DE CONTORNOS para torno cnc universidad catolica07 MECANIZADO DE CONTORNOS para torno cnc universidad catolica
07 MECANIZADO DE CONTORNOS para torno cnc universidad catolicalf1231
 
UNIDAD 3 ELECTRODOS.pptx para biopotenciales
UNIDAD 3 ELECTRODOS.pptx para biopotencialesUNIDAD 3 ELECTRODOS.pptx para biopotenciales
UNIDAD 3 ELECTRODOS.pptx para biopotencialesElianaCceresTorrico
 
presentacion medidas de seguridad riesgo eléctrico
presentacion medidas de seguridad riesgo eléctricopresentacion medidas de seguridad riesgo eléctrico
presentacion medidas de seguridad riesgo eléctricoalexcala5
 
Seleccion de Fusibles en media tension fusibles
Seleccion de Fusibles en media tension fusiblesSeleccion de Fusibles en media tension fusibles
Seleccion de Fusibles en media tension fusiblesSaulSantiago25
 
Voladura Controlada Sobrexcavación (como se lleva a cabo una voladura)
Voladura Controlada  Sobrexcavación (como se lleva a cabo una voladura)Voladura Controlada  Sobrexcavación (como se lleva a cabo una voladura)
Voladura Controlada Sobrexcavación (como se lleva a cabo una voladura)ssuser563c56
 
Reporte de simulación de flujo del agua en un volumen de control MNVA.pdf
Reporte de simulación de flujo del agua en un volumen de control MNVA.pdfReporte de simulación de flujo del agua en un volumen de control MNVA.pdf
Reporte de simulación de flujo del agua en un volumen de control MNVA.pdfMikkaelNicolae
 
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
 
desarrollodeproyectoss inge. industrial
desarrollodeproyectoss  inge. industrialdesarrollodeproyectoss  inge. industrial
desarrollodeproyectoss inge. industrialGibranDiaz7
 
Tinciones simples en el laboratorio de microbiología
Tinciones simples en el laboratorio de microbiologíaTinciones simples en el laboratorio de microbiología
Tinciones simples en el laboratorio de microbiologíaAlexanderimanolLencr
 
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kV
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kVEl proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kV
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kVSebastianPaez47
 
Una estrategia de seguridad en la nube alineada al NIST
Una estrategia de seguridad en la nube alineada al NISTUna estrategia de seguridad en la nube alineada al NIST
Una estrategia de seguridad en la nube alineada al NISTFundación YOD YOD
 

Último (20)

PPT ELABORARACION DE ADOBES 2023 (1).pdf
PPT ELABORARACION DE ADOBES 2023 (1).pdfPPT ELABORARACION DE ADOBES 2023 (1).pdf
PPT ELABORARACION DE ADOBES 2023 (1).pdf
 
Sesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO CersaSesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
Sesión 02 TIPOS DE VALORIZACIONES CURSO Cersa
 
Curso intensivo de soldadura electrónica en pdf
Curso intensivo de soldadura electrónica  en pdfCurso intensivo de soldadura electrónica  en pdf
Curso intensivo de soldadura electrónica en pdf
 
Manual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdfManual_Identificación_Geoformas_140627.pdf
Manual_Identificación_Geoformas_140627.pdf
 
¿QUE SON LOS AGENTES FISICOS Y QUE CUIDADOS TENER.pptx
¿QUE SON LOS AGENTES FISICOS Y QUE CUIDADOS TENER.pptx¿QUE SON LOS AGENTES FISICOS Y QUE CUIDADOS TENER.pptx
¿QUE SON LOS AGENTES FISICOS Y QUE CUIDADOS TENER.pptx
 
nom-028-stps-2012-nom-028-stps-2012-.pdf
nom-028-stps-2012-nom-028-stps-2012-.pdfnom-028-stps-2012-nom-028-stps-2012-.pdf
nom-028-stps-2012-nom-028-stps-2012-.pdf
 
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIAS
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIASTEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIAS
TEXTURA Y DETERMINACION DE ROCAS SEDIMENTARIAS
 
CLASe número 4 fotogrametria Y PARALAJE.pptx
CLASe número 4 fotogrametria Y PARALAJE.pptxCLASe número 4 fotogrametria Y PARALAJE.pptx
CLASe número 4 fotogrametria Y PARALAJE.pptx
 
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
 
07 MECANIZADO DE CONTORNOS para torno cnc universidad catolica
07 MECANIZADO DE CONTORNOS para torno cnc universidad catolica07 MECANIZADO DE CONTORNOS para torno cnc universidad catolica
07 MECANIZADO DE CONTORNOS para torno cnc universidad catolica
 
UNIDAD 3 ELECTRODOS.pptx para biopotenciales
UNIDAD 3 ELECTRODOS.pptx para biopotencialesUNIDAD 3 ELECTRODOS.pptx para biopotenciales
UNIDAD 3 ELECTRODOS.pptx para biopotenciales
 
presentacion medidas de seguridad riesgo eléctrico
presentacion medidas de seguridad riesgo eléctricopresentacion medidas de seguridad riesgo eléctrico
presentacion medidas de seguridad riesgo eléctrico
 
Seleccion de Fusibles en media tension fusibles
Seleccion de Fusibles en media tension fusiblesSeleccion de Fusibles en media tension fusibles
Seleccion de Fusibles en media tension fusibles
 
Voladura Controlada Sobrexcavación (como se lleva a cabo una voladura)
Voladura Controlada  Sobrexcavación (como se lleva a cabo una voladura)Voladura Controlada  Sobrexcavación (como se lleva a cabo una voladura)
Voladura Controlada Sobrexcavación (como se lleva a cabo una voladura)
 
Reporte de simulación de flujo del agua en un volumen de control MNVA.pdf
Reporte de simulación de flujo del agua en un volumen de control MNVA.pdfReporte de simulación de flujo del agua en un volumen de control MNVA.pdf
Reporte de simulación de flujo del agua en un volumen de control MNVA.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
 
desarrollodeproyectoss inge. industrial
desarrollodeproyectoss  inge. industrialdesarrollodeproyectoss  inge. industrial
desarrollodeproyectoss inge. industrial
 
Tinciones simples en el laboratorio de microbiología
Tinciones simples en el laboratorio de microbiologíaTinciones simples en el laboratorio de microbiología
Tinciones simples en el laboratorio de microbiología
 
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kV
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kVEl proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kV
El proyecto “ITC SE Lambayeque Norte 220 kV con seccionamiento de la LT 220 kV
 
Una estrategia de seguridad en la nube alineada al NIST
Una estrategia de seguridad en la nube alineada al NISTUna estrategia de seguridad en la nube alineada al NIST
Una estrategia de seguridad en la nube alineada al NIST
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
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.pdfmarketingartwork
 
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
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
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...
 

Algoritmos 222

  • 1. intdias,mes,año,n = 0; Console.WriteLine("ingreseel dia"); dias= Convert.ToInt32(Console.ReadLine()); Console.WriteLine("ingreseel mes"); mes= Convert.ToInt32(Console.ReadLine()); Console.WriteLine("ingreseel año"); año = Convert.ToInt32(Console.ReadLine()); if (año% 4 == 0 && (año% 100 != 0 ||año % 400 == 0)) { switch(mes) { case 1: n = dias; break; case 2: n = 31 + dias; break; case 3: n = 59 + dias; break; case 4: n = 90 + dias; break; case 5: n = 120 + dias; break; case 6: n = 151 + dias; break; case 7:
  • 2. n = 181 + dias; break; case 8: n = 212 + dias; break; case 9: n = 243 + dias; break; case 10: n = 273 + dias; break; case 11: n = 304 + dias; break; case 12: n = 334 + dias; break; } } else switch(mes) { case 1: n = dias; break; case 2: n = 31 + dias; break; case 3: n = 59 + dias; break;
  • 3. case 4: n = 90 + dias; break; case 5: n = 120 + dias; break; case 6: n = 151 + dias; break; case 7: n = 181 + dias; break; case 8: n = 212 + dias; break; case 9: n = 243 + dias; break; case 10: n = 273 + dias; break; case 11: n = 304 + dias; break; case 12: n = 334 + dias; break; } Console.WriteLine("el numero de diases"+ n + " del año" + año); Console.Read();
  • 4. inti, n,edad,hombres_mayores=0,hombres= 0, mujeres=0; double promedio_total,promedio_mujeres,suma_edades=0,suma_edad_hombres=0, suma_edad_mujeres=0; char sexo; Console.WriteLine("ingrese el numerode alumnos:"); n = Convert.ToInt32(Console.ReadLine()); for(i=1;i<=n; i++) { Console.WriteLine("ingrese el sexodel alumno:"+i); sexo= Convert.ToChar(Console.ReadLine()); switch(sexo) { case 'H': do { Console.WriteLine("ingreselaedaddel alumno:"+i); edad=Convert.ToInt32(Console.ReadLine()); } while((edad>25)||( edad<15)); suma_edad_hombres=suma_edad_hombres+edad; hombres= hombres+ 1; if (edad>= 18) hombres_mayores=hombres_mayores+1;
  • 5. break; case'M': do { Console.WriteLine("ingreselaedaddel alumno:"+i); edad= Convert.ToInt32(Console.ReadLine()); } while ((edad>25) ||(edad<15)); mujeres= mujeres+1; break; } } suma_edades=suma_edad_hombres+suma_edad_mujeres; promedio_total =suma_edades/n; promedio_mujeres=suma_edad_mujeres/mujeres; Console.WriteLine("cantidadde hombres mayoresde edad:"+hombres_mayores); Console.WriteLine("edadpromediode las mujeres:"+promedio_mujeres); Console.WriteLine("edadpromediototal:"+promedio_total); Console.Read();