Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i;
- float sum = 0,grades[10];
- for (i = 0; i < 10; i++)
- {
- printf("Entre com a nota :\n");
- scanf("%f",&grades[i]);
- sum = sum + grades[i];
- }
- printf("Media das notas : %.3f\n",sum/10);
- printf("Notas superiores a media :\n");
- for (i = 0; i < 10; i++)
- {
- if (grades[i] > sum/10)
- {
- printf("%.3f\n",grades[i]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment