C# Input Tutorial
class Program{
static void Main(string[] args)
{
int a, b, c;
Console.Write("Enter First Number>> ");
a = int.Parse(Console.ReadLine());
Console.Write("Enter Second Number>> ");
b = int.Parse(Console.ReadLine());
c = a + b;
Console.WriteLine("\nA={0}\nB={1}\nSum={2}", a, b, c);
}
}
No comments:
Post a Comment