1085: 求奇数的乘积(多实例测试)(奇数判断)

#include <stdio.h>
int main()
{
    int n, i, j, sum, k;
    sum = 1;
    while (scanf("%d", &n) != EOF)
    {
        for (k = 0; k < n; k++)
        {
            scanf("%d", &j);
            if (j % 2 != 1) //判断是否为奇数
                sum *= j;
            /* code */
        }
        printf("%d\n", sum);
        sum = 1;
    }
    return 0;
}
上一篇:关于执行webdriver.Chrome; 报错WebDriverException: Message: unknown error: Element is not clickable at poin


下一篇:1085: 求奇数的乘积(多实例测试)Java