Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
Checking time span between two timezone times
Linked list problem with remove
DijkstraAlgo
Battle Algorythm
ByVal
07-05-20
Testing 004
pankaj_sql
Project Euler Problem 6
d
Please log in to post a comment.