I need to develop a program in C# of users inputting 10 numbers for an array and then having the lowest and highest picked out of the ten.
ANy help here is greatly appreciated.
1
Expert's answer
2012-07-06T07:46:16-0400
int[] arr = new int[10]; for (int i = 0; i < arr.Length; i++) { arr[i] = int.Parse(Console.ReadLine()); } int min = arr[0]; int max = arr[0]; for (int i = 1; i < arr.Length; i++) { if (arr[i] > max) max = arr[i]; if (arr[i] < min) min = arr[i]; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment