Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define MAX 10
- int main() {
- int i;
- float soma=0, notas[MAX], media;
- for(i=0; i<MAX; i++) {
- printf("Entre com a nota %d: ",i+1);
- scanf("%f", ¬as[i]);
- soma += notas[i];
- }
- media = soma/MAX;
- printf("\nMedia = %.2f", media);
- printf("\nNotas maiores do que a media:\n");
- for(i=0; i<MAX; i++)
- if(notas[i] > media)
- printf("%.2f\n", notas[i]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement