You are viewing a single comment's thread. Return to all comments →
Here is my Java code, writing a separate method for fine() actually simplifies the logic due to return statements.
public static int fine(int da, int ma, int ya, int de, int me, int ye) { if(ye < ya) return 10000; if(ye > ya) return 0; if(me < ma) return 500 * (ma - me); if(me > ma) return 0; if(de < da) return 15 * (da - de); return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Library Fine
You are viewing a single comment's thread. Return to all comments →
Here is my Java code, writing a separate method for fine() actually simplifies the logic due to return statements.