nikolas_serafini

Lista 3 - Exercício 64

Jun 17th, 2013
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int number,product = 1;
  6.  
  7.     do
  8.     {
  9.         printf("Entre com um numero inteior e positivo :\n");
  10.         scanf("%d",&number);
  11.  
  12.         if (number == 0)
  13.         {
  14.             continue;
  15.         }
  16.         if (number % 2 == 0)
  17.         {
  18.             product = product*number;
  19.         }
  20.     }while (number != 0);
  21.  
  22.     printf("Produto dos pares = %d\n",product);
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment