Project 21: (General Case) Sum Within 3

Project: Variables 'a', 'b', 'c' and 'd' have been initialized to unknown values.  Appropriately initialize the value of 'withinThree'.  The value of 'withinThree' should be true if the sum of a and b is within 3 of the sum of b and c.

Example 1: a = 5, b = 4, c = 9, d = 3

the sum of a + b is 9 and the sum of c + d is 12.  The difference between these values is 3, so 'withinThree' should be true.

Example 2:  a = 5, b = 4, c = 9, d = 4    withinThree = false

Example 3:  a = 10, b = 5, c = 6, d = 7   withinThree = true

Example 4:  a = 1, b = 2, c = 8, d =5   withinThree = false

Note: If your code works for 10 test cases in a row, you can enter your e-mail address.