Cod sursa(job #1042374)

Utilizator samuel98Barac Samuel samuel98 Data 26 noiembrie 2013 22:43:27
Problema Factorial Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.37 kb
#include <fstream>

using namespace std;
ifstream s("fact.in");
ofstream v("fact.out");
int main()
{
    int d,c,p,n,uc,x;
    s>>p>>n;
    c=0;
    for(d=1;d<=n;d=d+1)
    {

    x=n;
    while(x!=0)
    {
        uc=x%10;
        c=c+1;
        x=x/10;
    }
    if(c!=p)
        v<<n;
    else
        n=n*0;
        v<<n;
    }
    return 0;
}