日期:2014-05-17 浏览次数:20797 次
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Excise_1
{
class Program
{
static void Main(string[] args)
{
int i, r, k, m;
string inputStr;
Console.WriteLine("请输入一个数:");
try {
do
{
inputStr = Console.ReadLine();
m = Convert.ToInt32(inputStr);
}
while (m < 2);
try
{
i = 2; k = m / 2;
while (i <= k)
{
r = m % i;
if (r == 0) break;
&