CSharp examples for Language Basics:int
Check age range
using System;// w w w . java 2s . com class DiscountOrNot { public static void Main() { int age; Console.Write("Enter your age: "); age = Convert.ToInt32(Console.ReadLine()); if ((age < 15) || (age > 65)) Console.WriteLine("Congratulations! You get a discount"); else Console.WriteLine("Sorry no discount for you"); } }