VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Determines whether the input number is a perfect square or not

by Salvador "Doy" Relleta Jalayajay (3 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 17th July 2007
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Determines whether the input number is a perfect square or not

Rate Determines whether the input number is a perfect square or not



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

Download this snippet    Add to My Saved Code

Determines whether the input number is a perfect square or not Comments

No comments have been posted about Determines whether the input number is a perfect square or not. Why not be the first to post a comment about Determines whether the input number is a perfect square or not.

Post your comment

Subject:
Message:
0/1000 characters