Write a program which accepts four numbers entered by the user. The program will then display: • YES, if the distance between all the numbers is the same. • NO, if the distance between the numbers are NOT all the same. Example 1: Enter A: 2 Etner B: 5 Enter C: 8 Enter D: 11 YES (because the distance between the four numbers is 3) Example 2: Enter A: 2 Etner B: 3 Enter C: 6 Enter D: 7 NO (because the distances between the four numbers are NOT all the same)
Comments
Leave a comment