Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
Tutorial thread

Craglitch

Corporal
DFM Member
Joined
Oct 29, 2021
Messages
246
Reaction score
691
DragonCoin
17,186
Fire Red Dragon
Frost Dragon
Eagle
Toturial by Craglitch

From previos thread i will show you how to use operator i will give some example to use and other operator is in table the table i fot froms w3schools my favorite coding web ok here the example .
C++:
#include <iostream>
using namespace std;

int main() {
  int x = 100 + 50;
  cout << x; // output will be 150
  return 0;
}

Although the + operator is often used to add together two values, like in the example above, it can also be used to add together a variable and a value, or a variable and another variable:
C++:
int a = 100 + 50;        // 150 (100 + 50)
int b = a + 250;      // 400 (150 + 250)
int c = b + b;     // 800 (400 + 400)

OTHER TABLES :
*

* https://www.w3schools.com/cpp/cpp_operators_comparison.asp
* https://www.w3schools.com/cpp/cpp_operators_logical.asp


HERE OPERATOR TABLE (ARITHMETIC)
OperatorNameDescriptionExampleTry it
+AdditionAdds together two valuesx + yTry it »
-SubtractionSubtracts one value from anotherx - yTry it »
*MultiplicationMultiplies two valuesx * yTry it »
/DivisionDivides one value by anotherx / yTry it »
%ModulusReturns the division remainderx % yTry it »
++IncrementIncreases the value of a variable by 1++xTry it »
--DecrementDecreases the value of a variable by 1
 

KrXpster

Private
DFM Member
Joined
Aug 30, 2021
Messages
38
Reaction score
105
DragonCoin
300
Oyen The Arrogant Cat
Toturial by Craglitch

From previos thread i will show you how to use operator i will give some example to use and other operator is in table the table i fot froms w3schools my favorite coding web ok here the example .
C++:
#include <iostream>
using namespace std;

int main() {
  int x = 100 + 50;
  cout << x; // output will be 150
  return 0;
}

Although the + operator is often used to add together two values, like in the example above, it can also be used to add together a variable and a value, or a variable and another variable:
C++:
int a = 100 + 50;        // 150 (100 + 50)
int b = a + 250;      // 400 (150 + 250)
int c = b + b;     // 800 (400 + 400)

OTHER TABLES :
*

* https://www.w3schools.com/cpp/cpp_operators_comparison.asp
* https://www.w3schools.com/cpp/cpp_operators_logical.asp


HERE OPERATOR TABLE (ARITHMETIC)
OperatorNameDescriptionExampleTry it
+AdditionAdds together two valuesx + yTry it »
-SubtractionSubtracts one value from anotherx - yTry it »
*MultiplicationMultiplies two valuesx * yTry it »
/DivisionDivides one value by anotherx / yTry it »
%ModulusReturns the division remainderx % yTry it »
++IncrementIncreases the value of a variable by 1++xTry it »
--DecrementDecreases the value of a variable by 1
Tq info.Boleh la belajar kalau untuk beginner.
 
Top