sum 3 numbers in csharp

To sum three numbers in C#, you can use the + operator to add them together. Here's an example code snippet:

main.cs
int num1 = 5;
int num2 = 10;
int num3 = 15;

int sum = num1 + num2 + num3;

Console.WriteLine("The sum of the three numbers is: " + sum);
138 chars
8 lines

In this example, we declare three integer variables (num1, num2, and num3) and assign them values. We then declare another integer variable (sum) and assign it the sum of the three numbers using the + operator. Finally, we print out the result using Console.WriteLine().

gistlibby LogSnag