w3resource
C# Sharp Programming Exercises

C# Sharp Exercises: Print the sum of two numbers


C# Sharp Basic: Exercise-2 with Solution

Write a C# Sharp program to print the sum of two numbers.

In mathematics, summation (capital Greek sigma symbol: ∑) is the addition of a sequence of numbers; the result is their sum or total. The numbers to be summed may be integers, rational numbers, real numbers, or complex numbers.

C# sharp Exercises: Print the sum of two numbers

Sample Solution:

C# Sharp Code:

public class Exercise2
{
    public static void Main()
    {
        System.Console.WriteLine(15+17);
    }
}

Sample Output:

32 

Flowchart:

Flowchart: C# Sharp Exercises - Print the sum of two numbers

C# Sharp Code Editor:

Improve this sample solution and post your code through Disqus

Previous: Write a C# Sharp program to print Hello and your name in a separate line.
Next: Write a C# Sharp program to print the result of dividing two numbers.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming