Addition of two numbers
using System;
public class Sum
{
public static void Main(String[] args)
{
int a,b,c; Console.WriteLine("Enter the
value for a:");
a=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the value for b:");
b=Convert.ToInt32(Console.ReadLine());
c=a+b;
Console.WriteLine("Answer of
{0}+{1}:{2}",a,b,c);
Console.ReadLine();
}
}
output :
No comments:
Post a Comment