C# defines the following arithmetic operators.
| Operator | Meaning |
|---|---|
| + | Addition |
| - | Subtraction |
| * | Multiplication |
| / | Division |
| % | Remainder |
The following code illustrates how to use the basic arithmetic operators.
using System;
class Program
{
static void Main(string[] args)
{
int i = 4;
int j = 5;
int result = i + j;
Console.WriteLine(result);
}
}
The result
9
| ww___w___._java__2___s__.___co_m_ | Contact Us |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |