You are viewing a single comment's thread. Return to all comments →
public static int howManyGames(int p, int d, int m, int s) { int sum = 0; int c = 0;
while (sum + p <= s) { sum += p; p = Math.max(p - d, m); c++; } return c; }
}
Seems like cookies are disabled on this browser, please enable them to open this website
Halloween Sale
You are viewing a single comment's thread. Return to all comments →
public static int howManyGames(int p, int d, int m, int s) { int sum = 0; int c = 0;
}