Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to calculate the highest possible combination of variables?

  1. #1
    Junior Member
    Join Date
    Sep 2019
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to calculate the highest possible combination of variables?

    I'm pretty new to coding, but I really enjoy it and had an idea that I want to figure out. Basically, I play this fantasy sports game where each user is granted $100 and a price tag is given to every player, according to how good they are. What I'm hoping to accomplish is to create a formula that assigns all the players I'm considering a value, depending on how likely they are to get me points, and then for the program to calculate the highest possible team value that doesn't exceed $100.

    How would I be able to code a program that runs through every possible combination of variables, and then spits out the one that will get me the high value?

    Thanks

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,475
    Thanks
    53
    Thanked 2,405 Times in 2,358 Posts

    Default Re: How to calculate the highest possible combination of variables?

    How would I be able to code a program
    Before trying to code any program you need to work out an algorithm that solves the problem.
    Given a working algorithm, then try coding the program in java.

    Do you have an algorithm that solves the problem?
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Combination lock
    By Pinares in forum What's Wrong With My Code?
    Replies: 11
    Last Post: February 26th, 2013, 06:56 PM
  2. Differences between local variables and instance variables
    By rob17 in forum Java Theory & Questions
    Replies: 2
    Last Post: March 6th, 2012, 08:34 PM
  3. Printing a Combination
    By ranjithfs1 in forum Loops & Control Statements
    Replies: 2
    Last Post: March 6th, 2012, 10:24 AM
  4. A deadly combination
    By grNadpa in forum Object Oriented Programming
    Replies: 5
    Last Post: February 25th, 2012, 06:20 PM
  5. Instance Variables and local variables difference
    By dcwang3 in forum Java Theory & Questions
    Replies: 3
    Last Post: October 31st, 2011, 06:33 AM