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