I have a question and this one will be quick. I just need to convert this little snippet from C to Java.
Here is the C code
(source: cip-labs.net)
Here is what I have done so far. I put $$$$ sings where I was super confused.
float benford10(int n, int d){
float j = $$$$$$(10, n-1), s=0, i;
for(i=$$$$($$$(10,(n-2))); i<=j-1; i++){
s+= $$$(1+(1/((i*10)+d)));
}
return s;
}
Can anyone help me translate the code from C to java? I would appreciate it so much. Thanks!