Cod sursa(job #2675044)
Utilizator | Data | 21 noiembrie 2020 09:38:38 | |
---|---|---|---|
Problema | Ciurul lui Eratosthenes | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.3 kb |
#include <bits/stdc++.h>
using namespace std;
int main ()
{
int n, p;
bool not0=false;
p=1;
while (n!=0)
{
cin>>n;
if(n!=0)
{
not0=true;
p*=n;
}
}
if(not0==false) cout<<0;
else cout<<p;
return 0;
}