Hi,
I am learning
VB 2005. I started with a basic console application for calculating square root of a number. The code is as below:
******************
Module Module1
Sub Main()
Dim y As Integer
Console.WriteLine("Enter number !")
y = Console.Read()
MsgBox("Square root of " & y & " is " & System.Math.Sqrt(y))
End Sub
End Module
*******************
The above is not reading the value of y properly. If I enter '1', it reads it as '48' and gives result accordingly. If I enter '2', it reads it as '49'.
Is there any setting required to be done ?
Thanks.