IN C# Given the following integer array: int[] intNumbers = new int[] {13, ‐42, ‐13, 1963, 0, 39, 42, 10, 1974, 3691, ‐17, 1226, ‐99}; a) output all elements in the array b) output the first and last elements in the array c) output the given array in the order shown d) output the given array in reverse order e) sort and output the array in ascending order f) sort and output the array in descending order g) output the value of the largest element in the array h) output the value of the smallest element in the array.   For this program, you should not assume that you know the number of elements in the array. Remember the .Length property of the array will tell you how many there are. If you hard code 13 in your program you will get an “R”. Hint: Console.WriteLine(intNumbers.Length);

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section10.3: Pointer Arithmetic
Problem 4E
icon
Related questions
Question

IN C# Given the following integer array:
int[] intNumbers = new int[] {13, ‐42, ‐13, 1963, 0, 39, 42, 10, 1974, 3691, ‐17, 1226, ‐99};
a) output all elements in the array
b) output the first and last elements in the array
c) output the given array in the order shown
d) output the given array in reverse order
e) sort and output the array in ascending order
f) sort and output the array in descending order
g) output the value of the largest element in the array
h) output the value of the smallest element in the array.

 

For this program, you should not assume that you
know the number of elements in the array.
Remember the .Length property of the array will
tell you how many there are. If you hard code 13 in
your program you will get an “R”.
Hint: Console.WriteLine(intNumbers.Length);

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT