>There is an error message which displays "warning: assignment to 'int' from 'double'".
That's not an error, it's a warning. It's telling you that the fractional part of a floating-point value will be truncated when you assign it to an integer variable. You fix it by using doubles instead of ints.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401