Cod sursa(job #38145)
Utilizator | Data | 25 martie 2007 15:08:57 | |
---|---|---|---|
Problema | Next | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
#include <fstream.h>
int main ()
{
ifstream f("next.in");
ofstream g("next.out");
double n,d;
f>>n;
f>>d;
int x,k;
x=n/d;
double z,y;
z=n/d;
y=z-x;
k=d*y;
double m;
m=n+(d-k)-1;
g<<m;
g.close ();
f.close ();
return 0;
}