Choosing Data Types

Bitcoins are given as an integer, therefore, we can declare a variable of type int for their value. For Chinese yuan and commission we receive a floating-point number, therefore, we are going to use double. As double is the data type with bigger scope, and the output should also be a floating-point number, we will use it for the other variables we create as well.

results matching ""

    No results matching ""