Arithmetics
The addition and subtraction operators in C++ are +
and -
respectively.
This line prints out the variable bananas
and pineapples
added together:
std::cout << bananas + pineapples << std::endl;
Make the program prints out the sum of a
and b
in the first line and the difference of a
and b
in the second line.