i have an simple console application and i want that use be able of only enter numbers. here's the code
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
int n, sum;
sum = 5000;
Console.WriteLine("enter number of conversations");
n = int.Parse(Console.ReadLine());
if (n <= 100)
{
sum = sum + n * 5;
}
else
{
sum += (100 * 5) + (n - 100) * 7;
}
Console.WriteLine(sum);
Console.ReadKey();
}
}
}