Q:

write c# program to read 2 integers from keyboard and do summation then print the result of summation

0

write c# program to read 2 integers from keyboard and do summation then print the result of summation

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

internal class Program
{
    private static void Main(string[] args)
    {
        int num1, num2;
        //prompt message to take input
        Console.Write("enter first integer value: ");
        num1 = Convert.ToInt32(Console.ReadLine());
        //prompt message to take input
        Console.Write("enter second integer value: ");
        num2 = Convert.ToInt32(Console.ReadLine());

        int result = num1 + num2;
        Console.WriteLine("result of summation is : "+result);
    }
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now