Javalogist
BAN USER
Free spirit of a Javalogist...
How about this:
int plyrs[]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int pls = 10;//Total players for param'zation
int plOut=4;//Wich one goes out
int kick=1;//to compute who to kick out of the game.
//pls-1 c'oz last one is the winner.
for (int x=0;x<pls-1;x++)
{
kick+=plOut;
kick%=pls;
if (plyrs[kick]<0) kick++;
plyrs[kick]*=-1;
System.out.println("Player out:"+
(-plyrs[kick])+" @ idx "+kick);
kick++;
}
System.out.println("And the winner is:"+ plyrs[(kick+plOut)%pls]);
for (int x:plyrs)
System.out.println("Out:"+x);
Either I didn't get the question right or something... if its about generating a list of numbers that are factors of 3, 5 and 7 the will the folloiwng not do?
for (int x=3;x<MAX;x++)
if (x%3==0|| x%5==0|| x%7==0)
System.out.println(x);
This snippet will generate a list as follows:
3, 5, 6, 7, 9, 10, 12, 14, 15, 18, 20, 21, 24, 25, 27, 28, 30, 33, 35, 36, 39, 40, 42, 45, 48, 49 etc..
The sample above are missing numbers like 14, 30 etc...
I can't see the point of writing any more lines than that!
I'll be happy to be corrected.
Cheers!
J
RepConnieLavender, Animator at Altera
My name is ConnieLavender . I am working as a Broker associate . I love field work and visiting different places to ...
RepUrfiDolomi, Android Engineer at Abs india pvt. ltd.
I am working as a library aide with 3 years experience in this field. I understand how to file and ...
RepVictoriaMitchell, Animator at ABC TECH SUPPORT
I am an Analysis Manager.I have 7 years of experience in leveraging data analysis to develop. And I love ...
RepNancyNieves, Accountant at ABC TECH SUPPORT
Hey I am a HR Trainer. I have been working in this field for almost 3 years. I am very ...
RepLoisHarvey, Apple Phone Number available 24/7 for our Customers at Absolute Softech Ltd
Working as a Content editor it's almost 10 years at Deco Refreshments, Inc. As a content editor is someone ...
RepDavidJohaan, Digital marketing Experinced at Abs india pvt. ltd.
I am David , a scanner operator for seven years in the industry Paearb. Six months ago , I’d an injury ...
RepElijahMiller, abc at A9
I am highly organized with exceptional commitment to task completion and quality assurance when working with computer software programs. I ...
RepZoeParker, Java Experienced at Abs india pvt. ltd.
I am Zoe , a Security Analyst with a record of success in completing financial market research and conducting earnings estimates ...
RepI am a management dietitian who plans food programs . I use personal counselling , cooking demonstrations, lectures and workshops as a ...
Reprizzafilher, Java Developer at Achieve Internet
Sorter with 3+ years of experience , performs duties in a safe manner in compliance with all local, state, and federal ...
RepBruceKeter, HTML Experienced at 247quickbookshelp
Bruce , a pediatrician studies psychoanalysis where I try to understand children's needs and family dynamics. To do more research ...
Repreiviasmith, Malwarebytes customer service at ABC TECH SUPPORT
I am Reivia an outgoing and motivated Travel Consultant with over 5 years of experience in delivering professional travel related ...
Repnasliebaker, Solutions Engineer at Edinprotechnologies
Je suis Naslie , un chercheur interdisciplinaire et collaboratif axé sur l'amélioration de la santé humaine et le mentorat de ...
Repdevlinadevid, CAD Designer at FeatureCAM
Experienced CAD drafter seeking an advanced architectural position. Interested in culinary arts and currently in a course for making sushi ...
Repvickgonder9, Integration Software Engineer at Arista Networks
I am Antonio , a well-experienced Sales Representative who has been working in the Suadela Investment for almost 2 years. I ...
Repharrytallh, Web Developer at Realty Depot
I am working as a Web developer . Here I create and maintain websites. Here I handle many responsibilities where I ...
Repkrishamoris, Area Sales Manager at Accolite software
I am Krisha , an organized Cosmetology Instructor with 4 years of experience. Successful at keeping detailed records and personalizing lesson ...
RepRaimeCarrillo, Area Sales Manager at 247quickbookshelp
Hi, I am Raime from Tampa USA . I work as an Local account executive employee. I work in many fields ...
RepNiaNorna, Analyst at ADP
I am an established career journalist with 15 years of writing and copy editing experience in the newsroom. Seeking to ...
RepEmilRuiz, Data Engineer at Apple
Emil , an Experienced producer has been producing top-rated shows for five years running. Excels at defining and expanding target audience ...
RepIsabellaJones, abc at 8x8
Extensive experience of 3 years in network architecture and application requirements for corporate data and voice networks, planning, designing and ...
RepMaryMartinez, Jr. Software Engineer at Automated Traders Desk
I am Mary, a knowledgeable sports official skilled at maintaining a safe environment for both players and observers, inspecting the ...
RepJudeSandin, Associate at Absolute Softech Ltd
My name is JudeSandin . I am working at Bold Ideas as a Web designer. With 5 years experience . I am ...
Repeffiefranke, Mail clerk at Envirotecture Design
Hello, I am Effie Mail clerk . I sort mail by department and category, utilizing sorting machines and similar administrative technology ...
RepRitterNicole, DIGITAL MARKETING at Arista Networks
I am Ritter, Experimental psychologist refers to work done who apply experimental methods to psychological study and the processes that ...
RepHenryBrown, Associate at A9
I am an experienced budget analyst skilled at researching and consolidating financial and budget information. I am taught record keeping ...
RepAngieGibson, Jr. Software Engineer at Agilent Technologies
I am Angie , a Power Plant Operator with in-depth knowledge of all aspects of operation and maintenance and 3 years ...
RepSuziCorni, Accountant at A9
I have strong critical and analytical skills with reading, writing, and comprehension. I have exceptional speaking skills without losing train ...
RepBessieHicks, Area Sales Manager at Accolite software
Professional Aerobics instructor with over 2 years experience in this field . I am working at Wilson's Jewelers . I am ...
Repterricjohnson8547, Animator at 247quickbookshelp
Hello, I am a dancer. I have completed my studies from New York. And today I am a dance teacher ...
RepYaniraBryant, Accountant at CGI-AMS
I am Yanira , a writer by fate. Went from writing for media outlets to exploring the world of content creation ...
RepJohnPitts, Development Support Engineer at Barclays Capital
John , an urban regional planner with over four years of experience helping cities and local areas to properly plan for ...
Repjepatricia581, Accountant at 247quickbookshelp
We business management is the coordination and organization of business activities. Business managers oversee operations and help employees reach their ...
RepShaneFrazier, Analyst at Brocade
I am Shane , a professional with 7 years of experience in financial markets. Outperforms, manages client satisfaction for Vashikaran Specialist ...
RepLucasMoore, AT&T Customer service email at 8x8
I am creative with many years experience in the Advertising-Account Director, I have strong attention to detail and ability in ...
Repearlenecnicely77, Animator at 247quickbookshelp
Hey, I'm a Receiving clerk. And I love my work. Apart from this, I am doing some new experiments ...
RepEvaSanchez, Animator at Abs india pvt. ltd.
Eva , Manufacturing Worker with 3+ years of experience working in Dynatronics . Went for traveling around the world and gets to ...
RepRhondaLillie, Android test engineer at AppNexus
I work as an General and operations manager at the Official All Star Café. presenting love stories, ghost stories. Currently ...
Reptunbanataba, Court Reporter at Wildlife officer
I am a court reporter . My work is often licensed and to record proceedings using a steno type machine. through ...
RepKayIrish, Animator at ADP
Hey,I am a psychologist.I cure your problems with Vashikaran Specialist In Meerut. I am deeply counseling your problems ...
RepElizabethMaxim, Android test engineer at AMD
A financial economist is responsible for the production and distribution of goods and services. We are also responsible for collecting ...
Repdebrak836636, Developer Program Engineer at Arista Networks
I am Debra , a multilingual (English/Italian/French) Judge with 5 years of experience in presiding over court proceedings, prosecuting ...
Repdelioshorn, Member Technical Staff at Atmel
Attentive Teller Supervisor with 4 years of experience in assisting customers to meet financial needs and referring customers to partners ...
Replloismyers, Grounds maintenance worker at Eagle Hardware & Garden
I am a ground maintenance worker who typically mows grass, edges, and fertilises lawns. I also weed and mulch landscape ...
RepJuanitaRiegel, Analyst at ABC TECH SUPPORT
Juanita a dedicated Assistant Event Coordinator adept at managing various corporate events, developing budgets, and recruiting and training new personnel ...
RepMargySpencer, Area Sales Manager at ABC TECH SUPPORT
Hey my name is Margy and i am a scientific photographer. I have full experience of 5 years of work ...
RepAngelaFox, Android Engineer at AMD
My name is AngelaFox . I'm working at Integra Design as a Municipal court judge . The adjudicator acts in the ...
RepFernBryant, Android Engineer at ABC TECH SUPPORT
I FernBryant working at Naugles as a Financial consultant . I have 5 years of experience . I also guide people regarding ...
And the output looks like follows:
- Javalogist August 17, 2008Player out: 6 @ idx 5
Player out: 1 @ idx 0
Player out: 7 @ idx 6
Player out: 2 @ idx 1
Player out: 8 @ idx 7
Player out: 3 @ idx 2
Player out: 9 @ idx 8
Player out: 4 @ idx 3
Player out: 10 @ idx 9
And the winner is :5
Out:-1
Out:-2
Out:-3
Out:-4
Out:5
Out:-6
Out:-7
Out:-8
Out:-9
Out:-10