C#: Check if an given integer is within 20 of 100 or 200
Check Within 20 of 100 or 200
Write a C# program to check if the given integer is within 20 of 100 or 200.
Sample Solution:-
C# Sharp Code:
Sample Output:
Input an integer: 25 False
Sample Output:
Input an integer: 50 False
Sample Output:
Input an integer: 70 False
Sample Output:
Input an integer: 80 True
Sample Output:
Input an integer: 90 True
Sample Output:
Input an integer: 110 True
Sample Output:
Input an integer: 120 True
Sample Output:
Input an integer: 125 False
Sample Output:
Input an integer: 130 False
Flowchart:

C# Sharp Code Editor:
Previous: Write a C# program to check the sum of the two given integers and return true if one of the integer is 20 or if their sum is 20.
Next: Write a C# program to convert a given string into lowercase.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.