Advertisement
Guest User

sdsadsad

a guest
May 20th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.08 KB | None | 0 0
  1. #include <stdio.h>
  2. float PROMEDIO ();
  3. int VALIDANOTA (int, int);
  4. int main ()
  5. {
  6.     int DNI[5], PAR1[5], PAR2[5], ASIS[5], MARK[5], NOASIS[5], PROMNOASIS[5], PAR2_10[5];
  7.     char EST[5];
  8.     int I;
  9.     for (I=1; I<=5; I++);
  10.     {
  11.         printf ("\n Ingrese el DNI del Alumno %d: ",I);
  12.         scanf ("%d", &DNI[I]);
  13.     }
  14.     printf ("\n La nota del primer parcial del alumno %d: ",I);
  15.     PAR1 [I] = VALIDANOTA (0, 10);
  16.     printf ("\n La nota del segunda parcial del alumno %d: ",I);
  17.     PAR2 [I] = VALIDANOTA (0, 10);
  18.     for (I=1; I<=5; I++);
  19.     {
  20.         printf ("\n Ingrese el porcentaje de asistencia del alumno %d: ",I);
  21.         scanf ("%d", &ASIS[I]);
  22.     }
  23.     for (I=1; I<=5; I++);
  24.     {
  25.     if  (PAR1[I] > 7 && PAR2[I] > 7)
  26.     EST[I]='P';
  27.     if ((PAR1[I] > 4 && PAR1[I] > 7) && (PAR2[I] > 4 && PAR2[I] > 7))
  28.     EST[I]='A';
  29.     else
  30.     EST[I]='D';
  31.     }
  32. }
  33. ///////////////////////////////////////
  34. int VALIDANOTA (int LI, int LS)
  35. {
  36.     int I=0, BAND=0, NOTA[5];
  37.     do {
  38.         if (BAND == 0) {
  39.         BAND = 1;
  40.         } else
  41.             printf ("\n Ingrese el dato nuevamente: ");
  42.         scanf ("%d", &NOTA[I]);
  43.     } while (NOTA[I] < LI && NOTA[I] > LS);
  44.     return (NOTA[5]);
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement