Subtraction: -
Subtraction is a matematical operation, it can be used for integers and real numbers. from the first operand subtract the second operand. it follows that it is not associative.-
Description
par1 - par2
Input
- par1 - Any number
- par2 - Any number
Output
- Result - Numbers
Compatible programing languages:
Basic | Visual Basic .NET | FreeBASIC | C | C++ | Visual C++ .NET | C# | Java | JavaScript | Object Pascal | Pascal | Free Pascal | PHP
Basic | Visual Basic .NET | FreeBASIC | C | C++ | Visual C++ .NET | C# | Java | JavaScript | Object Pascal | Pascal | Free Pascal | PHP
Examples
Example
Subtraction the possible of use:x = 95 - 5; // x=90
y = 100- x; // y=10
z = (x-y)-30.5; // z = 49.5
Example
Even one example in what situations we can use the operation Subtraction:i - 10
3.14 - 1
if (i - 10 >0) i = i-5;
Example
Other pieces of example codes:100 - 2
(j - 8)
i = i - 1
x = 10 * 5 -j
y=y-1
(10 - j * 0.5)
You can find it in the following collections: arithmetic operators
Subtraction in another programming language: