Search:

Type: Posts; User: djl1990

Search: Search took 0.18 seconds.

  1. Re: New to the complmunity, need some assistance please.

    How did you sort this?

    Im trying to learn aswell.
  2. Re: New to the complmunity, need some assistance please.

    Yes, also like the poster above said, the calculations are doing 8*100 first.

    Maybe you should try changing the maths around and do: (headcount) * 100 / 8

    That should give you the correct...
  3. Re: New to the complmunity, need some assistance please.

    Hmmmmmmmm something is still not right it gives the following results

    The total amount of 'Heads' entered is:
    8
    The total amount of 'Tails' entered is:
    8
    The percentage of 'Heads' is:
    0
    The...
  4. Re: New to the complmunity, need some assistance please.

    Also where you calculate the percentage here:

    float percentHeads = (headCount++) / 8 * 100;
    float percentTails = (tailCount++) / 8 * 100;

    you dont want to divide headcount++ and tailCount++ ,...
  5. Re: New to the complmunity, need some assistance please.

    When your printing out values such as headCount and percentHeads you dont need quotation marks.

    You just need the value in the brackets such as:

    System.out.println ("The total amount of 'Heads'...
Results 1 to 5 of 5