-
Assign a
numberto a variable. -
Determine whether the number is within 10 of 100.
Output
number: 92
output: 92 is within 10 of 100.
number: 108
output: 108 is within 10 of 100.
number: 51
output: 51 is not within 10 of 100.
-
Have the user enter values for
number_1andnumber_2. -
Determine whether
number_1is within 10 ofnumber_2.
Output
Enter the first number: 36
Enter the second number: 28
output: 36 is within 10 of 28.
---
Enter the first number: 251
Enter the second number: 260
output: 251 is within 10 of 260.
---
Enter the first number: 95
Enter the second number: 15
output: 95 is not within 10 of 15.
-
Have the user enter values for
number_1andnumber_2. -
Have the user choose the
limitof how many numbers may be in between the two. -
Determine whether
number_1andnumber_2are within the limit set by the user.Enter the first number: 235 Enter the second number: 555 Enter how far apart the numbers are allowed to be: 1000 235 is within 1000 of 555. --- Enter the first number: 66 Enter the second number: 62 Enter how far apart the numbers are allowed to be: 5 66 is within 5 of 62. --- Enter the first number: 34 Enter the second number: 101 Enter how far apart the numbers are allowed to be: 20 34 is not within 20 of 101.