Choosing Data Types

The length of the side of the ground, the width and the length of the bench, will be given as integers, therefore, in order to store their values, we can declare variables of type int. We will be given floating-point numbers for the width and the length of the tiles and this is why we will use double. The output will be a floating-point number as well, so the variables will be of type double as well.

results matching ""

    No results matching ""