Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

add numbers c#

//c#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace Program
{
    public class Addition
    {
        public static void Main(string[] args)
        {
           int x = 5; //set value for x
           int y = 6; //set value for y
           int sum; 
            
           sum = x + y; //add the numbers
            
           Console.WriteLine(sum); // Print the sum of x + y
        }
    }
}
 
PREVIOUS NEXT
Tagged: #add #numbers
ADD COMMENT
Topic
Name
4+7 =