Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Update 2D Array
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int [,] intMatrix = new int [2,3]; // הגדרת המערך // Set the 2D Array for( int row=0; row<intMatrix.GetLength(0); row++) // לולאה חיצונית לסריקת השורות { for( int col=0; col<intMatrix.GetLength(1); col++) // לולאה פנימית לסריקת התאים של השורה הנוכחית { Console.WriteLine("Please type the cell with row {0} and column {1}",row,col); // רווח הדפסת התא הנוכחי עם רווח intMatrix[row,col]= int.Parse(Console.ReadLine()); } } // Print the 2D Array for( int row=0; row<intMatrix.GetLength(0); row++) // לולאה חיצונית לסריקת השורות { for( int col=0; col<intMatrix.GetLength(1); col++) // לולאה פנימית לסריקת התאים של השורה הנוכחית { Console.Write(intMatrix[row,col]+ " "); // הדפסת התא הנוכחי עם רווח } Console.WriteLine(" "); // קפיצת שורה בהדפסה לשורה הבאה של המערך } } } }
run
|
edit
|
history
|
help
0
Passing Multidimensional Arrays As Arguments
Implementing two interfaces with the same method signature
gfhfgsdfsfdsdghgfddfg
Animal generator (Under construction!)
Classes, properties, methods, ling begining
test
Sum Matrix Main Diagonal
Dictionary that tells which key was not present
Aufgabe 1 J.S.
asxsdf