$5 Java K/D Ratio Contest

OliverE

Power member.
Reputation
0
$5 Java K/D Ratio Contest

Using the tutorials ive created in recent weeks: http://cybertechforums.com/thread-1385

Create a java application that;
  • asks the user how many kills they have
  • how many deaths they have
  • work out their kill to death ratio
  • if their K/D ratio is over or equal to 1, then display a well done message
  • if their K/D ratio is below 1, then display a disappointment message

This contest cant be entered by CyberTechForums team members (Mods, Super Mods or Admins)

First person to post here with a working example, will win the contest.
The application will be tested a number of times with differnet criteria.

The application above has already been created, and is obviously possible.

Im not going to give any hints to this contest, ill just let you know if you win or lose.

Cash is sent via paypal.
If you cannot recieve paypal payments, you can give the prize to second place, or recieve 5000 bytes.
 
If I actually complete this, I don't want any money. Keep it for CTF.
 
I'll get started since no one is doing it.
 
BleepyEvans said:
Your the only active non staff member :p

Well, once you've made over 1000 posts on a forum, you can bet that you're not going to be leaving any time soon. :)

I win.

[java]import java.util.Scanner;

public class main {

public static void main(String[] args) {
Scanner kills = new Scanner(System.in);
Scanner deaths = new Scanner(System.in);
System.out.println("Enter the amount of kills, press enter, then enter the amount of deaths, and press enter.");
double howmanykills = kills.nextDouble();
double howmanydeaths = deaths.nextDouble();

double kd = howmanykills/howmanydeaths;

System.out.print("Your kill/death ratio is: ");
System.out.println(kd);

if (kd >= 1) {
System.out.println("Well done!");
}
else if (kd <= 1) {
System.out.println("Your kill/death ratio is lower than one. I am disappoint. :(");
}
else {
System.out.println("Unexpected error!");
}
}
}[/java]

I can't seem to make a JAR though, so...
 
Thanks!

My first "Java application."

Feel free to use this.

Moar challenges! In more than Java!

Don't even say that you already gave a PHP challenge...:p
 
But I have.
Ive got another PHP challenge if you want one.
 
Yes please!

I've given up on that first PHP challenge.
 
Back
Top