For the computation involving multiple types of variables, such as integer and double, is the following approach the correct way in terms of not causing any hidden error or information lost?
int a = 2;
double b = 3.0;
double c;
c = (double)(a+b);
c = (double)(a/b);