Search:

Type: Posts; User: haloboy

Search: Search took 0.32 seconds.

  1. Replies
    6
    Views
    2,381

    Re: Possible loss of precision (double/int)

    Threw 2 "break;" statements in there and she works like a charm!Thanks for the help helloworld922!I learned a lot about initialization and precision thanks to your help.
  2. Replies
    6
    Views
    2,381

    Re: Possible loss of precision (double/int)

    I have initialized the variables and the program is almost complete!However my answer results in an infinite loop and I dont know why.The answer is correct but no matter where I put the output it is...
  3. Replies
    6
    Views
    2,381

    Re: Possible loss of precision (double/int)

    Thanks for the reply,the error is now gone.I forgot about floating point.I used the example you gave and type-casted gross from a double to an int.However I have 3 errors in the program saying...
  4. Replies
    6
    Views
    2,381

    Possible loss of precision (double/int)

    Ok I know the problem is in the gross section but I dont know why that plus sign is giving me an issue here is the code:



    import java.util.Scanner;
    public class Lab2
    {
    public static void...
Results 1 to 4 of 4