| 发表于:2007-04-02 21:48:141楼 得分:0 |
private sub forminvb_click(byval sender as object, byval e as system.eventargs) handles me.click dim nloop as integer = 1 while (nloop < 501) if (checktail(nloop, nloop * nloop)) then debug.writeline(nloop.tostring() + " : " + (nloop * nloop).tostring()) end if nloop = nloop + 1 end while end sub private function checktail(byval num1 as integer, byval num2 as integer) as boolean if (num1 = 0) then return true end if if ((num1 mod 10) = (num2 mod 10)) then return ((true) and (checktail(decimal.floor(num1 / 10), decimal.floor(num2 / 10)))) else return false end if end function | | |
|