행렬 Col 과 Row를 입력받기

Console Programming/C# Console 2019. 9. 23. 17:27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Syntax09
{
    class Program
    {
        static void Main(string[] args)
        {
            int col, row;
            Console.Write("Col : ");
            col = Int32.Parse(Console.ReadLine());
            Console.Write("Row : ");
            row = Int32.Parse(Console.ReadLine());
 
            for(int i = 0 ; i < row ; i++)
            {
                for(int j = 0 ; j < col ; j++ )
                {
                    Console.Write($"({j},{i})\t");
                }
                Console.WriteLine();
            }
        }
    }
}
 
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
 

 

: