Created
May 28, 2016 02:51
-
-
Save isagallerani/5669f434cf48919225dc752db47b80f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main () { | |
int nota[5], rep = 0, rec = 0, a = 0, b = 0, i; | |
for (i = 0; i < 5; i++) { | |
printf ("Digite a nota: "); | |
scanf ("%d", ¬a[i]); | |
} | |
for (i = 0; i < 5; i++) { | |
if (nota[i] < 5) { | |
rep++; | |
} | |
else if (nota[i] >= 5 && nota[i] < 6) { | |
rec++; | |
} | |
else if (nota[i] >= 6 && nota[i] < 8) { | |
b++; | |
} | |
else if (nota[i] >= 8) { | |
a++; | |
} | |
} | |
printf ("Numero de alunos reprovados: %d\n", rep); | |
printf ("Numero de alunos em rec: %d\n", rec); | |
printf ("Numero de alunos conceito B: %d\n", b); | |
printf ("Numero de alunos conceito A: %d\n", a); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment