如何让C#控制台程序结束不马上退出

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleTest1
{
class Program
{
static void Main(string[] args)
{
int col;
int row;
for (col = 1; col <= 9; col++)
{
row = 1;
while (row <= col)
{
Console.Write("{0}*{1}={2}\t",row,col,row*col);
row++;
}
Console.Write("\n");
}

}
}
}

第1个回答  2012-09-15
在”调试“选项中点击“开始执行(ctrl+f5)”。不要点击“调试”。
第2个回答  2010-08-26
加上一句 Console.ReadLine();本回答被提问者采纳
第3个回答  2010-08-26
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleTest1
{
class Program
{
static void Main(string[] args)
{
int col;
int row;
for (col = 1; col <= 9; col++)
{
row = 1;
while (row <= col)
{
Console.Write("{0}*{1}={2}\t",row,col,row*col);
row++;
}
Console.Write("\n");
Console.ReadKey(true);
}

}
}
}
相似回答