读书人

杭电ACM2006单数的乘积

发布时间: 2013-03-19 17:22:05 作者: rapoo

杭电ACM2006奇数的乘积

#include <iostream>using namespace std;int main(){  int n,t,x=1;  while(cin>>n)  {  x=1;    while (n--)    {    cin>>t;    if(t%2==1)    x=x*t;    }    cout<<x<<endl;  }}

读书人网 >编程

热点推荐