A junior maths problem, with a VBS to find the answer
Unknown ~i plus 100 for a full square ~x,i plus 168 for another full square ~y,i,x,y are positive integers, to find i,x,y
---------------------------------------------------
N=0
msg1= "Unknown ~i plus 100 for a complete square ~x" +CHR (10)
msg2= "I plus 168 is another complete square number ~y" +CHR + "i,x,y are positive integers" +CHR (10)
L=inputbox (msg1+msg2+ "Please enter the search scope of I to find i,x,y.1~?:")
If IsNumeric (l) Then
msg4=l+ "Search for answers"
For I=1 to L
X=int (SQR (i+100))
Y=int (SQR (i+168))
If x^2=i+100 and y^2=i+168 then
Msg3= "Then I,x,y is:" +cstr (i) + "," +cstr (X) + "," +cstr (y)
MsgBox Msg1+msg2+msg3,vbokonly,msg4
N=1
Exit For
End If
Next
If N=0 Then
Msg3= "Then did not find the right answer!" "
MsgBox Msg1+msg2+msg3,vbokonly, Msg4
End If
Else
Msg3= "Then did not find the right answer!" "
MsgBox Msg1+msg2+msg3,vbokonly, "There is a problem with the search scope!" "
End If
-------------------------------
The conclusion is 156,16,18
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.