Last active
December 25, 2015 00:29
-
-
Save imryan/6887846 to your computer and use it in GitHub Desktop.
Stupid birthday game. Makes no sense, but alright.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
u took my code faggit