Numero positivo o negativo
an anonymous user
·
C#
·

using System; namespace MyCompiler { class Program { public static void Main(string[] args) { int dato1; Console.WriteLine("Aplicacion que permite recibir un dato entero e indicar si es positivo o negativo"); Console.Write("Dame un numero entero"); dato1= int.Parse(Console.ReadLine()); if (dato1>0) { Console.WriteLine("El numero {0} es positivo: ", dato1); } else { Console.WriteLine("El numero {0} es negativo:", dato1); } Console.ReadKey(); } } }
Click on the Run button to get started.
The code/input has changed since you last clicked on Run. Click it
again to see the updated changes.
Comments