Skip to content

Instantly share code, notes, and snippets.

@imryan
Last active December 25, 2015 00:29
Show Gist options
  • Save imryan/6887846 to your computer and use it in GitHub Desktop.
Save imryan/6887846 to your computer and use it in GitHub Desktop.
Stupid birthday game. Makes no sense, but alright.
import java.util.Scanner;
public class BirthdayGame {
public static void main(String[] args) {
// Declare variables
Scanner sc = new Scanner(System.in);
double birthday = 0.0;
// Display the directions
System.out.println("Enter your birth month\nMultiply that number by 5\nAdd 6 to that number\nMultiply that number by 4\nAdd 9 to that number\nMultiply that number and add your birth day to the number.\nEnter when done: ");
// Calculate the number
birthday = sc.nextDouble();
birthday = (birthday - 165) / 100;
// Output the number
System.out.println("Your number: " + birthday);
}
}
@joeyv
Copy link

joeyv commented Oct 8, 2013

u took my code faggit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment