Imports System Public Class Test Public Shared Sub Main() Dim N as integer Console.Write("Digite número:") N=Convert.ToInt32(Console.ReadLine()) If(N>0) Then Console.WriteLine("Positivo") Else If(N<0) Then Console.WriteLine("Negativo") Else if(N=0) then Console.WriteLine("Neutro") Else End If End If End If End SubEnd Class
N=5
Digite número:
Unhandled Exception: System.FormatException: Input string was not in the correct format at System.Int32.Parse (System.String s) [0x00000] at System.Convert.ToInt32 (System.String value) [0x00000] at Test.Main () [0x00000]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!