using System;
namespace SqrtValue
{
class Program
{
static void Main(string[] args)
{
for (int i = 1; i <= 100000; i++)
{
double sqrtValue100 = Math.Sqrt(i + 100);
double sqrtValue168 = Math.Sqrt(i + 168);
if ((sqrtValue100 - Convert.ToInt32(sqrtValue100) == 0d) &&
(sqrtValue168 - Convert.ToInt32(sqrtValue168) == 0d))
{
Console.WriteLine(i);
}
}
while (true) ;
}
}
}
运行结果为:156