You are viewing a single comment's thread. Return to all comments →
int pagenumber=0; int count=0; int x=k; int noOfProblems; for(int i=0;i<arr.size();i++){ pagenumber +=1; noOfProblems=arr.get(i); for(int j=1;j<=noOfProblems;j++){ if(j==pagenumber && j<=k){ System.out.println(j); count++; } if(j>k){ k = k+x; pagenumber++; if(j==pagenumber){ count++; } } } k=x; } return count;
Seems like cookies are disabled on this browser, please enable them to open this website
Lisa's Workbook
You are viewing a single comment's thread. Return to all comments →
Java