输入一万以内的数,满足如下条件的所有整数他加上一百后是个完全平方数

问题描述:

输入一万以内的数,满足如下条件的所有整数他加上一百后是个完全平方数

10^2-100
11^2-100
……
99^2-100
VB 代码:
For i = 10 To 100
Text1.Text = Text1.Text & (i * i - 100) & vbTab
If i Mod 10 = 0 Then Text1.Text = Text1.Text & vbCrLf
Next i
结果:
0,
21,44,69,96,125,156,189,224,261,300,
341,384,429,476,525,576,629,684,741,800,
861,924,989,1056,1125,1196,1269,1344,1421,1500,
1581,1664,1749,1836,1925,2016,2109,2204,2301,2400,
2501,2604,2709,2816,2925,3036,3149,3264,3381,3500,
3621,3744,3869,3996,4125,4256,4389,4524,4661,4800,
4941,5084,5229,5376,5525,5676,5829,5984,6141,6300,
6461,6624,6789,6956,7125,7296,7469,7644,7821,8000,
8181,8364,8549,8736,8925,9116,9309,9504,9701,9900,