标签:write else convert main ati oid ace collect int
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace text2
{
class Program
{
static void Main(string[] args)
{
int n = Convert.ToInt16(Console.ReadLine());
int m = 0;
if(n%2==0)
{
Console.WriteLine("约数为:");
for(int i=2;i<=n/2;i++)
{
if(n%i==0)
{
Console.WriteLine(i);
}
}
}
else
{
Console.WriteLine("约数为:");
for(int i=2;i<=(n-1)/2;i++)
{
if(n%i==0)
{
Console.WriteLine(i);
}
}
}
Console.Read();
}
}
}
标签:write else convert main ati oid ace collect int
原文地址:http://www.cnblogs.com/fuckman/p/7533211.html