Declare a variable temperature and initialize it to 98.6. Instructor Notes: Note that "initialize" means "declare and assign a value in the same statement." ote that this exercise wants a single statement, not a complete program. What data type is appropriate for a value such as the value listed above?

Respuesta :

Limosa

Answer:

float temperature = 98.6; //declaration and initialization of the variable

Explanation:

In the programming language, there are two types of data types for the decimal number that is float and double.

  • Double data type is used when we require to print more than two decimal value and it also contains both integer type and decimal type value.
  • Float data type is used when we required to print one or two decimal value, it only contains and print decimal value.

So, we have to print one decimal value, that's why we use float data type.