C# - division: /

division is a matematical operation, it can be used for integers and real numbers.

/

Description

par1 / par2
Used keywords: /

Input


Output

  • Result - real numbers result of the division is always a real number.
Note: if we want a integer as a result, so let's use the integer division operation or by using some rounding function we can convert the result to an integer.

Examples

C#

division the possible of use:
x = (float)64 / 8;   // x=8
y = x / 0.5;   // y=16
z = ((float)(x * 2) / y +5);// z=1.1

C#

even one example in what situations we can use the operation division:
(float)i / 0xab
(float)27 / 3
(2.5 / 2 + 1.25) + 2

C#

Other pieces of example codes:
((float)x / 5)
(float)50 / i
y = (float)x / 0xa
x >= (float)y / 5
y = y/ 3.14
y = (float)x / 0xa

/

Description

par1 / par2
Used keywords: /

Input


Output

  • Result - real numbers result of the division is always a real number.
Note: if we want a integer as a result, so let's use the integer division operation or by using some rounding function we can convert the result to an integer.

Examples

C#

division the possible of use:
x = (float)64 / 8;   // x=8
y = x / 0.5;   // y=16
z = ((float)(x * 2) / y +5);// z=1.1

C#

even one example in what situations we can use the operation division:
(float)i / 0xab
(float)27 / 3
(2.5 / 2 + 1.25) + 2

you can find it in the following collections: arithmetic operators
Languages: en hu cz sk