Last active
December 15, 2015 15:29
-
-
Save fernandoguedes/5281744 to your computer and use it in GitHub Desktop.
Trabalho Aline, exercicio 01 (em C).
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 <stdlib.h> | |
#include <stdio.h> | |
main() { | |
int n[8], i, soma, cont; | |
soma = 0; | |
cont = 0; | |
for(i = 1; i <= 8; i++) { | |
printf("Informe um numero: \n"); | |
scanf("%d", &n[i]); | |
if (n[i] > 30) { | |
soma = soma + n[i]; | |
cont++; | |
} | |
} | |
printf("%d numeros são maiores que 30.\nA soma deles é igual a %d\n", cont, soma); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment