Ask Question
25 September, 10:57

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?

+5
Answers (1)
  1. 25 September, 11:32
    0
    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.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Declare a variable temperature and initialize it to 98.6. Instructor Notes: Note that "initialize" means "declare and assign a value in the ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers