hw-gen icon indicating copy to clipboard operation
hw-gen copied to clipboard

Add borrowing checkbox for subtraction problems

Open ezuk opened this issue 1 month ago • 0 comments

This commit adds a new checkbox to the print config view that allows users to generate only subtraction problems that require borrowing.

Changes:

  • Added "Only problems that require borrowing?" checkbox to the UI
  • Implemented requiresBorrowing() helper function to detect when a subtraction problem requires borrowing
  • Updated equation generation logic to filter problems based on the borrowing constraint
  • The filter only applies to subtraction category worksheets

The borrowing detection works by comparing each digit position from right to left and checking if any minuend digit is less than the corresponding subtrahend digit.

ezuk avatar Nov 10 '25 16:11 ezuk