• + 0 comments

    Can Someone Find the Error in my Function

    int restaurant(int l, int b) { if(0 == b % l ) { return b/l; } else { float frac = (float)b / (float)l ; int i = 1; while( (frac != (int)(frac)) ) { frac +=(float)b / (float)l; i++; } return (int)(i)*(int)(frac); } }