#37731: 程式碼


yp11251009@yphs.tp.edu.tw (701-24林秉弘(百花撩亂))


給學生
#include<iostream>
using namespace std;
int main()
{
    int a,b,c;
    cin>>a;
    while(a--)
    {
    cin>>b;
    int total=1;
    if(b!=0) while(b!=0) {c=b%10; totle*=c; b/=10;}
    else totle=0;
    cout<<totle<<endl;
}
}