You are viewing a single comment's thread. Return to all comments →
can anyone explain me what is problem in my code :
public static int howManyGames(int p, int d, int m, int s) {
int count=0;
int sum = p;
while(s>=sum){ while(p-d>=m){ p=p-d; sum+=p; count++; } sum+=m; count++; }
return count; } }
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 →
can anyone explain me what is problem in my code :
public static int howManyGames(int p, int d, int m, int s) {
int count=0;
int sum = p;
return count;
} }