Created
May 28, 2016 03:36
-
-
Save isagallerani/67ded20f0aad056cb9ef8fa78816f604 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> | |
int main () | |
{ | |
double nota[5]; | |
int rep=0,rec=0,B=0,A=0,i=0; | |
do | |
{ | |
//printf ("i inicial %d\n",i); | |
printf("Digite uma nota entre 0 e 10: "); | |
scanf("%lf",¬a[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) && (nota[i]<=10)) | |
{ | |
A++; | |
} | |
} | |
} | |
} | |
i++; | |
} while ((nota[i-1] < 11) && (i < 5)); | |
printf("O numero de alunos reprovados eh: %d\n",rep); | |
printf("O numero de alunos em recuperacao eh: %d\n",rec); | |
printf("O numero de alunos aprovados com conceito B eh: %d\n",B); | |
printf("O numero de alunos aprovados com conceito A eh : %d\n",A); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment