C#: Checks how many integers are needed to complete the range
Complete Missing Numbers in Range
Write a C# program that accepts a list of integers and checks how many integers are needed to complete the range.
For example [1, 3, 4, 7, 9], between 1-9 -> 2, 5, 6, 8 are not present in the list. So output will be 4.
Sample Solution:
C# Sharp Code:
Sample Output:
4 9
Flowchart:

C# Sharp Code Editor:
Previous: Write a C# program to find the pair of adjacent elements that has the highest product of an given array of integers.
Next: Write a C# program to check whether it is possible to create a strictly increasing sequence from a given sequence of integers as an array.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.