Skip to content

The code on Github is following my blog. I'm creating an app in steps. So, the code may not be running app, yet. But you can play with running application using link below.

License

Notifications You must be signed in to change notification settings

madameczek/FindMatchingExpressions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Find Matching Expressions

This code illustrates my blog, where I show an application which gives solutions in a math game.

The game

The rules are

  1. There are given two sets of integers (each element > 0).
  2. Between elements in each set a math is performed (+, -, *, /) respecting mathematical operators precedence.
  3. So, two sets of expressions are formed.
  4. Order of elements can not be changed.
  5. Element can be joined to create new number.
  6. Each intermediate operation gives integer result. Division operation gives no remaining.
  7. Task is: Find pairs of expressions which give true equation.

Examples

Set 1: 1, 2, 1
Set 2: 1, 2

Results:

  1. 1 - 2 * 1 = 1 - 2 = -1
  2. 1 - 2 / 1 = 1 - 2 = -1
  3. 1 + 2 - 1 = 1 * 2 = 2
  4. 1 * 2 * 1 = 1 * 2 = 2
  5. 1 * 2 / 1 = 1 * 2 = 2
  6. 1 + 2 * 1 = 1 + 2 = 3
  7. 1 + 2 / 1 = 1 + 2 = 3
  8. 1 * 2 + 1 = 1 + 2 = 3
  9. 12 * 1 = 12 = 12
  10. 12 / 1 = 12 = 12

Application

The application on Github is following my blog. I'm creating it in steps. So, it may not be running app, yet.
But you can play with running application here. Give Azure up to 4 minutes to recovery in case if app is detached.
Currently the app has no validation and in case of wrong input you may need to reload.

About

The code on Github is following my blog. I'm creating an app in steps. So, the code may not be running app, yet. But you can play with running application using link below.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages