eolymp
bolt
Try our new interface for solving problems
Problems

Product of nonzero digits

published at 2/16/24, 6:46:17 am

include <iostream>

using namespace std; int main() { int n,hasil=1; cin>>n; while(n>0) { if(n%10!=0) { hasil=hasil*(n%10); } n/=10; } cout<<hasil;

}