Simple Calculator Using c#: output: code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace calculator_using_switch_satement { class Program { static void Main(string[] args) { Console.Write("\tDate Time:"); DateTime dt = DateTime.Now; Console.WriteLine("{0}",dt); double a,b,choice,result; Console.WriteLine("Enter first no"); a = double.Parse(Console.ReadLine()); Console.WriteLine("Enter second no"); b = double.Parse(Console.ReadLine()); Console.WriteL...
CODE: Console.WriteLine("Enter Year:"); int year = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter Month Which Do You Want To Check:"); int month = Convert.ToInt32(Console.ReadLine()); switch (month) { case 1: Console.WriteLine("The Month is January Total days in this month is 31"); break; case 2: if ((year%4==0 && year%100 !=0)||year%400==0) { ...
Comments
Post a Comment