顯示具有 C sharp 標籤的文章。 顯示所有文章
顯示具有 C sharp 標籤的文章。 顯示所有文章

2011年5月16日 星期一

[C#] Console.ReadLine txt file

ex:
輸入:
1 5 3 5
23 59 0 34
21 33 21 10
0 0 0 0

輸出 :
1 5 3 5
23 59 0 34
21 33 21 10


using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Collections;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {   
            string line;
            while( (line=Console.ReadLine()) != null)