Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n, par, impar, c;
- for (c = 1; c < 3; c++) {
- printf("Digite um numero: ");
- scanf("%d", &n);
- if (n % 2 == 0) {
- par++;
- }
- else {
- impar++;
- }
- }
- printf("Foram informados: \nNumeros pares: %d \nNumeros impares: %d", par, impar);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement