Cod sursa(job #37747)
Utilizator | Data | 25 martie 2007 12:20:25 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | preONI 2007, Runda 4, Clasa a 9-a si gimnaziu | Marime | 0.18 kb |
#include<fstream.h>
int main()
{ifstream f("next.in");
ofstream g("next.out");
int n,d,i=0,m;
f>>n>>d;
m=i*d;
while(m<n)
{i++;
m=i*d;
}
g<<m;}