- Home
·
- Math/Dates
·
- Determines whether the input number is a perfect square or not
Determines whether the input number is a perfect square or not
Determines whether the input number is a perfect square or not
Rate Determines whether the input number is a perfect square or not
(2(2 Vote))
d = 0
a = CDbl(Text1.Text)
For b = 1 To a
c = b * b
If c = a Then
d = 1
End If
Next b
If d = 1 Then
MsgBox "Perfect Square", vbInformation
Else
MsgBox "Not Perfect Square", vbInformation
End If
End Sub
Determines whether the input number is a perfect square or not Comments
No comments yet — be the first to post one!
Post a Comment