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
Vajdalinky
Сортировка массива
eg
Ok
Intuit // C# // listing_4.1 (Console.WriteLine _ Форматный вывод)
regex
custom Generic Que Implementation
File_operations
zasasasa
SMS filter config Captures and Groups