Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- float PROMEDIO ();
- int VALIDANOTA (int, int);
- int main ()
- {
- int DNI[5], PAR1[5], PAR2[5], ASIS[5], MARK[5], NOASIS[5], PROMNOASIS[5], PAR2_10[5];
- char EST[5];
- int I;
- for (I=1; I<=5; I++);
- {
- printf ("\n Ingrese el DNI del Alumno %d: ",I);
- scanf ("%d", &DNI[I]);
- }
- printf ("\n La nota del primer parcial del alumno %d: ",I);
- PAR1 [I] = VALIDANOTA (0, 10);
- printf ("\n La nota del segunda parcial del alumno %d: ",I);
- PAR2 [I] = VALIDANOTA (0, 10);
- for (I=1; I<=5; I++);
- {
- printf ("\n Ingrese el porcentaje de asistencia del alumno %d: ",I);
- scanf ("%d", &ASIS[I]);
- }
- for (I=1; I<=5; I++);
- {
- if (PAR1[I] > 7 && PAR2[I] > 7)
- EST[I]='P';
- if ((PAR1[I] > 4 && PAR1[I] > 7) && (PAR2[I] > 4 && PAR2[I] > 7))
- EST[I]='A';
- else
- EST[I]='D';
- }
- }
- ///////////////////////////////////////
- int VALIDANOTA (int LI, int LS)
- {
- int I=0, BAND=0, NOTA[5];
- do {
- if (BAND == 0) {
- BAND = 1;
- } else
- printf ("\n Ingrese el dato nuevamente: ");
- scanf ("%d", &NOTA[I]);
- } while (NOTA[I] < LI && NOTA[I] > LS);
- return (NOTA[5]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement