Is it bad practice to initialize and do arithmetic within a variable? i.e say I have multiple rooms of different area dimensions that I must find the area of:
(example in feet)
double room_area1 = 9.5 * 6.8;
double room_area2 = 9.1 * 6.2;
double room_area3 = 10.0 * 7.1;
Or is it best to do:
double room_area1 = 9.5;
room_area1 = room_area1 * 6.8;
Is there any disparity between the two ways here or is it the same thing and just a matter of style?