answersLogoWhite

0


Best Answer

Use the comma operator:

double temp {1.0}, weight {5.5}, age {21.0};

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

6y ago

In C or C++, we use the comma (sequence) operator to initialise multiple variables of the same type in a single statement:

float temp=0.0, weight=0.0, age=0.0;

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How may the double variables temp weight and age be defined on one statement?
Write your answer...
Submit
Still have questions?
magnify glass
imp