0

My program is not working

public int twoDim( int [,] twoDArray) { int sum = 0; for( int i = 0; i< twoDArray.Length; i++) { for (int j = 0; j < twoDArray.Length; j++) { if (i%2==0&&j%2!=0) { sum += twoDArray[i, j]; } } } return sum; } static void Main(string[] args) { int [,]i ={{2,3},{2,5},{4,5},{3,5}}; Console.Write(twoDim(i)); } } https://code.sololearn.com/cIsqYH1EO3Rv/?ref=app

4th Mar 2020, 2:25 PM
Microne mafika
Microne mafika - avatar
2 odpowiedzi
+ 1
You have posted this case before. Please elaborate more on the previous thread rather than creating a new thread. It would help reducing duplicate questions 👍 https://www.sololearn.com/Discuss/2189561/?ref=app
4th Mar 2020, 2:43 PM
Ipang