Programming Exercise 2
Decision Making

1. Write a program that performs the following calculations and checks:

 Assume that we specify two points in the place with the declaration double x1,y1, x2,y2; Determine and print

2. Write a program that performs the following calculations and checks:

 Assume that specify an interval by a pair of int values (the ones at the beginning and end of the interval in the place with the declaration): 5 and 8 would specify the interval containing the numbers 5, 6, 7, and 8 inclusive. We declare int b1,e1, b2,e2; to represent the beginning and end of two intervals, and int x; so represent some value. Note that we will guarantee that the intervals are "well formed": b1 <= e1 and b2 <= e2.