+ 2

Challenge for Beginners

Given 4 numerical variables, of which the first Two represent one range and the other Two another range, write a code that says that the RANGES are totally disjoined or partially disjoined or one internal to the other. Happy Coding

11th Dec 2017, 1:51 PM
Umbe
Umbe - avatar
4 odpowiedzi
+ 3
What is wrong with my post? @Daniel Should i write examples?
12th Dec 2017, 6:15 AM
Umbe
Umbe - avatar
+ 2
OK so, 4 variables: a1,b1,a2,b2 _the first set contains the numbers ranging from a1 to b1; _the second set contains the numbers ranging from a2 to b2; Make a program that tells the one of these types of relationship between those two sets: 1. Partially intersected 2. One contained into the other 2. Empty intersection set Sample input: a1=4 b1=50 a2=2 b2=-7 Sample output: Empty intersection set Ask if you don't understand
12th Dec 2017, 7:12 PM
Umbe
Umbe - avatar
+ 1
?
11th Dec 2017, 11:30 PM
Daniel
Daniel - avatar
+ 1
Yes
12th Dec 2017, 11:24 AM
Daniel
Daniel - avatar