C++
Part of the C++ path, C++ How To digs into C++ How To Add Two Numbers in detail.
In this example, the user must input two numbers. Then we print the sum by calculating (adding) the two numbers:
You can use the rand() function, found in the <cstdlib> library, to generate a random number: