Jump to content

PHP program that can dynamically generate subtraction problems of different


nikitagarg13

Recommended Posts

The following are the types of subtraction problems you need to generate:

 

Subtraction of one number from the other where:

1) Both numbers n1, n2 lie in the range {5, 12} excluding 10.

2) Both numbers lie in the range {5, 12} and result is not equal to zero.

3) Both numbers lie in the range {9, 99} having zero either in one’s place or ten’s place or both.

4) Subtraction of 2-digit and 3-digit numbers such that there is no borrowing. (i.e.  For n1 – n2, unit’s place digit of n1 must be greater than that of n2. Similarly, ensure that there is no borrowing in ten’s place too.)

For eg., 543 – 32.

5)  Subtraction of 2-digit and 3-digit numbers such that there is borrowing. (i.e.  For n1 – n2, unit’s place digit of n1 must be smaller than that of n2.)

For eg., 56 – 37.

 

Also, result of subtraction should not be negative for any question.

Link to comment
Share on other sites

Is this your first homework? I'd expect the first class to go over setting up your work environment.

 

If you need help setting up XXAMP post in the right forum. I've only ever used WampServer and there's no difficulty in setting it up.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.