Results 1 to 6 of 6
 05232014, 11:08 PM #1Member
 Join Date
 May 2014
 Posts
 3
 Rep Power
 0
How to find biggest two int. numbers from four
Hello... this is my first thread I'm posting, so sorry if I may make some mistakes.
So, if you are a football/soccer fan, you know that in every FIFA World Cup you have 4 nations. From those 4, 2 will qualify to the Knockout stages.
Let's say, after all the group fixtures are played, the standings are as follows :
1. England  6 points
2. Spain  4 points
3. Brasil  3 points
4. Germany  1 point
I want to know how I can select ONLY England and Spain for the Knockout stage of the FIFA World Cup (The class I am working on).
Thank you very much for your help.
 Keimic53
 05232014, 11:21 PM #2
Re: How to find biggest two int. numbers from four
What have you tried?
If you don't understand my response, don't ignore it, ask a question.
 05232014, 11:29 PM #3Member
 Join Date
 May 2014
 Posts
 3
 Rep Power
 0
Re: How to find biggest two int. numbers from four
Hello Norm, thank you for your time.
Let's say each group's variables are:
int t1, t2, t3, t4;
^ (For each team) ^
I tried this 'Math.max' thing, which I'm still new to, to get an idea of how inexperienced I am so far.
Example:
int first = Math.max(t1, t2);
int second = Math.max(t3, t4);
But that doesn't make total sense, because if:
(t1 = 5), (t2 = 4) , (t3 = 2), (t4 = 1)... than the qualified teams are 1 and 3, not 1 and 2, as it's supposed to be.
Thank you again for your time
 Keimic53
 05232014, 11:33 PM #4Member
 Join Date
 May 2014
 Posts
 3
 Rep Power
 0
Re: How to find biggest two int. numbers from four
By the way, the points and fixtures are chosen randomly (Math.random)... although that is done.
Sorry for not advising you earlier.
Keep in mind also that two or more of the four teams may end up with the same points...
Thanks.
 05242014, 12:46 AM #5
Re: How to find biggest two int. numbers from four
two or more of the four teams may end up with the same points...
4 with same points
3 with same high points
2 with same high points
2 with same high and 2 with same second high points
2 with same second high points
etcIf you don't understand my response, don't ignore it, ask a question.
 05242014, 03:36 AM #6Senior Member
 Join Date
 Jan 2013
 Location
 Northern Virginia, United States
 Posts
 6,226
 Rep Power
 14
Re: How to find biggest two int. numbers from four
The Java^{TM} Tutorials  SSCCE  Java Naming Conventions
Poor planning on your part does not constitute an emergency on my part
Similar Threads

Can StreamTokenizer find numbers followed by letters
By kbreitsprecher in forum New To JavaReplies: 1Last Post: 03082012, 10:45 PM 
Find the Biggest Number + Smallest
By d4v1dz in forum New To JavaReplies: 19Last Post: 10262011, 06:43 AM 
Coding to find the Harshad numbers...
By nope in forum New To JavaReplies: 16Last Post: 03072011, 04:16 AM 
Find the sum of two numbers that are from two different arrays.
By bMorgan in forum New To JavaReplies: 8Last Post: 02082011, 07:27 AM 
Help with my code to find MinOfAll numbers
By May.ver.rick in forum New To JavaReplies: 9Last Post: 04202010, 04:46 AM
Bookmarks