using System;
class Program
{
static void Main()
{
// addition of two numbers
int a, b, sum;
Console.WriteLine("Enter the value of a:");
a = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the value of b:");
b = int.Parse(Console.ReadLine());
sum = a + b;
Console.WriteLine("The sum of {0} & {1} is {2}",a,b, sum);
Console.ReadLine();
}
}
class Program
{
static void Main()
{
// addition of two numbers
int a, b, sum;
Console.WriteLine("Enter the value of a:");
a = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the value of b:");
b = int.Parse(Console.ReadLine());
sum = a + b;
Console.WriteLine("The sum of {0} & {1} is {2}",a,b, sum);
Console.ReadLine();
}
}
Output |
No comments:
Post a Comment