208k views
4 votes
Write a statement that reads a floating point value from standard input into temperature. Assume that temperature. has already been declared as an double variable. Assume also that stdin is a variable that references a Scanner object associated with standard input.

User Justsee
by
5.6k points

1 Answer

0 votes

Answer:

cin>>temperature;

Step-by-step explanation:

This statement in c++ will take the input.The value entered by the user on the screen will be stored in the variable temperature. cin is an standard input method in c++ and is used take input from the screen. It is an object of istream class that is standard input stream .It corresponds to C stream stdin.

User Srini V
by
5.6k points