Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Perform Arithmetic Operation

From Groundhog Learning
Revision as of 15:50, 21 October 2025 by Groundhog (talk | contribs) (Updated via bot)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Carry out calculations using numbers, variables, and arithmetic operators.

Details

Arithmetic operations can be performed on variables to manipulate values in a program.

Perform Arithmetic Operation in C#

💻 C#

int x = 6
int y = 2

int sum = x + 3;            // addition: 9
int difference = x - y;     // subtraction: 4
int product = x * 5;        // multiplication: 30
int quotient = x / y;       // division: 3

Related Concepts