Reginaldojs

exercicio 64,lista 3

Jun 16th, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. int main(){
  4.     int i=0,n,prod=1;
  5.     printf("digite varios valores inteiros e positivos:\n");
  6.     while(i<=n){
  7.                scanf("%d",&n);
  8.                if(n==0)
  9.                break;
  10.                if(n%2==0){
  11.                prod=prod*n;}
  12.                i++;
  13.                }
  14.                printf("o produto sera %d\n",prod);
  15.     system ("pause");
  16.     return 0;
Advertisement
Add Comment
Please, Sign In to add comment