const double quarter = 0.25;
// and now variable quarter can only be 0.25double weight1;
int weight2;
weight1 = 154.49;
weight2 = (int) weight1;
// weight2 is now 154const double quarter = 0.25;
// and now variable quarter can only be 0.25double weight1;
int weight2;
weight1 = 154.49;
weight2 = (int) weight1;
// weight2 is now 154