|
I agree with CaptainMorgan that you should just use all doubles. Say we wanted to make a tester class in which the user can input values for the 5 numbers, so they can get the average. What happens if they input 92.5? You're always better of using doubles in math programs. If you want to make it so that in the tester the numbers appear as ints because it looks nicer, just cast. Like if you were to make a program that finds the original function after the user gives it 2 roots, and you don't want it to look ugly like 1.0x^2 + 2.0x + 3.0, just cast each to an int. This is a good practice in math programs because decimals are very common of course.
__________________
//Haha javac, can't see me now, can ya?
|