C#: Check if a number appears as either the first or last element of an array of integers
Check Number First or Last in Array
Write a C# program to check if a number appears as the first or last element of an array of integers. The array length is 1 or more.
Pictorial Presentation:

Sample Solution:
C# Sharp Code:
Sample Output:
Input an integer: 25 False
Flowchart:

C# Sharp Code Editor:
Previous: Write a C# program to count a specified number in a given array of integers.
Next: Write a C# program to compute sum of all the elements of an array of integers.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.