Whole dollars 🌶️
The program below is supposed to figure out how many whole dollars are in a price, then print that value. Try running it exactly as it is first, and read the compiler's error message; it's telling you something about assigning a double value to an int variable. Once you understand what it's complaining about, fix it using a cast: writing a type name in parentheses, like (int), directly in front of a value tells Java "convert this value to this type," even when that conversion might lose information. Your code will be tested with several different prices.