Dim no As Double Dim no1 As Double Dim s As String Dim i As Integer'To print the line System.Console.WriteLine("Enter number")'To read data from the user use System.Console.ReadLine and store in no no = System.Console.ReadLine'Math.Sqrt will calculate the square root of the number no1 = Math.Sqrt(no)'Math.Round(no1, 2) will return the number with 2 decimal places no1 = Math.Round(no1, 2) s = no1'IndexOf(".") will return the position of decimal in number i = (s.IndexOf("."))'if it is less than or equal to zero then the given number is perfect Square else given number is not perfect square. If i < 0 Then System.Console.WriteLine("Square Root is " & no1) System.Console.WriteLine(no & " is Perfect Square") Else System.Console.WriteLine("Square Root is " & no1) System.Console.WriteLine(no & " is not the perfect Square") End If