TASK1
TASK2
TASK3
Example for the array in C#, Run the program to understand it better
using System;
class Program
{
static void Main()
{
int n = Convert.ToInt32(Console.ReadLine());
int[] array = new int[n];
//Input
for(int i = 0; i < n; i++)
{
array[i] = Convert.ToInt32(Console.ReadLine());
}
//Output
for(int i = 0; i < n; i++)
{
Console.Write(array[i] + " ");
}
}
}
TASKS
This task may take more than 2 hours so be patient :D
Design a C# program that asks the user to enter a series of numbers.
The program should store the numbers in an array and then display the following data:
- The lowest number in the array
- The highest number in the array
- The total of the numbers in the array
- The average of the numbers in the array ==> (Total) / Number_Of_Elements
EXAMPLEs :
n : 5 //Length of the array
array : 2, 5, 15, 100, 75 //array elements
Lowest Number in the Array is : 2
Highest Number in the Array is : 100
total of the numbers in the array is : 197
Average of the numbers in the array is : 197 / 5 = 39.4
n : 3 //Length of the array
array : 3, 3, 3 //array elements
Lowest Number in the Array is : 3
Highest Number in the Array is : 3
total of the numbers in the array is : 9
Average of the numbers in the array is : 9 / 3 = 3
Next Lecture, Wednesday 1 PM