Cod sursa(job #229972)
Utilizator | Data | 12 decembrie 2008 12:35:38 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<stdio.h>
int n,m,d;
bool ok;
void calcul()
{
m=n;
while(ok!=true)
{
if(m%d==0)
{
printf("%d",m);
ok=true;
}
++m;
}
}
int main()
{
freopen("next.in","r",stdin);
freopen("next.out","w",stdout);
scanf("%d%d",&n,&d);
calcul();
return 0;
}