I was wondering why this piece of code is not outputting even or odd would I need to add a readline statement after the ternary operation
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace tenary
{
class Program
{
static void Main(string[] args)
{
string input; int a;
Console.WriteLine("Enter a number: ");
input = Console.ReadLine();
a = int.Parse(input);
input = (a % 2 == 0) ? "Even" : "Odd";
Console.ReadLine();
}
}
}