Question: Write a program by C# programming language that has the followings: static void Main(string[] args) try // Declare two integer variables named as row and

![static void Main(string[] args) try // Declare two integer variables named as](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f31eb5124d0_14066f31eb47651d.jpg)
Write a program by C# programming language that has the followings: static void Main(string[] args) try // Declare two integer variables named as "row" and "col" 11 - // Get the values of the "row" and "col from the user 11 ------ // if the value of the "row" is less than I, catch part will be run // if the value of the "col" is less than I, catch part will be run // 1/ Declare the two dimensional integer array "matrix" 1/ which has the size (row x col) // - // Create the StreamWriter object named as "sw". // "w" will reference "myfile.txt" // 1/ Call "CreateRandon Numbers" method // to assign random values to each element of "matrix" array 11 --- // Call "WriteToFile" method. // - 1/ Create the StreamReader object named as "sr". // "sr" will read all content of "myFile.txt" 11 and the content will be displayed at Console window. } catch (Exception) // } 1 public static void Create RandomNumbers(int[, ) ) 1/ Create random numbers for each element of the "m" array. 1/ Random values will be between 10 and 100 1 public static void WriteToFile(StreamWriter W, int[] m) { // Write the elements of the array in the matrix format public static void CreateRandomNumbers(int[] =) // Create randon numbers for each element of the "m" array. // Random values will be between 10 and 100 } public static void WriteToFile(StreamWriter w, int[] m) 11 Write the elements of the "m" array in the matrix format Il to the file "myfile.txt". // Call the "AverageOfARTElements method and 11 write the returned value after the text 11 "The average of all elements of the matrix:" in the file "myfile.txt". // Put the header "LIST OF ODD NUMBERS IN EACH ROW:" in the file "myFile.txt". I/ Call the "WriteOddNumbersOfEachRow" method. // ------ ------------- 1/ Put the header "LIST OF EVEN NUMBERS IN EACH COLUMN in the file "myFile.txt" 1/ Call the "WriteEvenNumbersOfEachColumn" method. > public statie double AverageOfAuElements(int[] =) 11 } public static void WriteOddNumbersOfEachRow(StreamWriter w, int.) ) // Write the odd numbers in each row of the " array // to the "myfile.txt" as in the output example. 3 public static void WriteEvenNumbersOfEachColumn(StreamWriter w, int[] m) 1 // Write the even numbers in each column of the "." array Il to the "myfile.txt" as in the output example. 1 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
