Problema en el ciclo
Publicado por Simon (1 intervención) el 15/04/2011 16:01:15
Tengo un problema con este programa se me queda pegado en el ciclo
Alguna solucion porfavor me urge
store 0 to nota1,nota2,nota3,notadef_estu,prom_estu, prom_sec,porc_mujer,cedula,acumpro_estu
contador=0
respta='si'
cont_mujer=0
cont_hombre=0
cont_apro=0
cont_repro=0
menor=9999
mayor=0
@ 1,1 say "Desea seguir? " get respta
read
DO WHILE respta='si'
contador=contador+1
@ 2,1 say "Ingrese Nombre" get nombre
@ 3,1 say "Ingrese cedula" get cedula
@ 4,1 say "Ingrese Sexo? F/M " get sexo
@ 5,1 say "Ingrese calificacion 1" get nota1
@ 6,1 say "Ingrese calificacion 2" get nota2
@ 7,1 say "Ingrese calificacion 3" get nota3
If sexo='F'
cont_mujer=cont_mujer+1
Else
cont_hombre=cont_hombre+1
ENDIF
nota_defestu=nota1+nota2+nota3
prom_estu=nota_defestu/3
acumpro_estu=prom_estu
If notadef_estu >=48
cont_apro=cont_apro+1
MESSAGEBOX ("APROBADO")
ELSE
cont_repro=cont_repro+1
MESSAGEBOX ("REPROBADO")
?"Desea continuar? Y "
?respta
ENDIF
If notadef_estu >=mayor
mayor=notadef_estu
ENDIF
If notadef_estu <=menor
menor=notadef_estu
ENDIF
?"Desea Continuar? Y"
?respta
prom_sec=acumpro_estu/contador
?"Promedio de la seccion"
?prom_sec
?"Cantidad de reprobados"
?cont_repro
?"Cantidad de aprobados"
?cont_apro
?"Mayor Nota"
?mayor
?"Menor Nota"
?menor
porc_mujer=cont_mujer*100/contador
?"El porcentaje de mujeres es"
?porc_mujer
?"Cantidad de hombres"
?cont_hombre
Enddo
Aqui esta el programa
Alguna solucion porfavor me urge
store 0 to nota1,nota2,nota3,notadef_estu,prom_estu, prom_sec,porc_mujer,cedula,acumpro_estu
contador=0
respta='si'
cont_mujer=0
cont_hombre=0
cont_apro=0
cont_repro=0
menor=9999
mayor=0
@ 1,1 say "Desea seguir? " get respta
read
DO WHILE respta='si'
contador=contador+1
@ 2,1 say "Ingrese Nombre" get nombre
@ 3,1 say "Ingrese cedula" get cedula
@ 4,1 say "Ingrese Sexo? F/M " get sexo
@ 5,1 say "Ingrese calificacion 1" get nota1
@ 6,1 say "Ingrese calificacion 2" get nota2
@ 7,1 say "Ingrese calificacion 3" get nota3
If sexo='F'
cont_mujer=cont_mujer+1
Else
cont_hombre=cont_hombre+1
ENDIF
nota_defestu=nota1+nota2+nota3
prom_estu=nota_defestu/3
acumpro_estu=prom_estu
If notadef_estu >=48
cont_apro=cont_apro+1
MESSAGEBOX ("APROBADO")
ELSE
cont_repro=cont_repro+1
MESSAGEBOX ("REPROBADO")
?"Desea continuar? Y "
?respta
ENDIF
If notadef_estu >=mayor
mayor=notadef_estu
ENDIF
If notadef_estu <=menor
menor=notadef_estu
ENDIF
?"Desea Continuar? Y"
?respta
prom_sec=acumpro_estu/contador
?"Promedio de la seccion"
?prom_sec
?"Cantidad de reprobados"
?cont_repro
?"Cantidad de aprobados"
?cont_apro
?"Mayor Nota"
?mayor
?"Menor Nota"
?menor
porc_mujer=cont_mujer*100/contador
?"El porcentaje de mujeres es"
?porc_mujer
?"Cantidad de hombres"
?cont_hombre
Enddo
Aqui esta el programa
Valora esta pregunta


0