inta,b,c;Console.WriteLine("———————————————————————————————————————————");Console.WriteLine("Program to print the addition of two numbers");Console.WriteLine("———————————————————————————————————————————");Console.Write("Enter the 1st number ");a=Convert.ToInt32(Console.ReadLine());Console.Write("\nEnter the 2nd number ");b=Convert.ToInt32(Console.ReadLine());c=a+b;Console.WriteLine("\nAddition "+c);Console.WriteLine("———————————————————————————————————————————");
Output
kodingwindow@kw:~/csharp$ dotnet run
———————————————————————————————————————————
Program to print the addition of two numbers
———————————————————————————————————————————
Enter the 1st number 50
Enter the 2nd number -10
Addition 40
———————————————————————————————————————————
kodingwindow@kw:~/csharp$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.