Skip to content

Instantly share code, notes, and snippets.

@joeyv
Last active December 25, 2015 00:29
Show Gist options
  • Save joeyv/6887860 to your computer and use it in GitHub Desktop.
Save joeyv/6887860 to your computer and use it in GitHub Desktop.
Simple program to make your friends think your smart.
import java.util.Scanner;
public class Birthday
{
public static void main (String[] args)
{
double number;
double birthday;
Scanner scan = new Scanner(System.in);
//inport number
number = scan.nextDouble();
//Directions
System.out.print ("\tSteps:" + "\nFirst, take your month number and multiply that by 5." + "\nNext, add 6 to that number." + "\nThen, multiply that number by 4." + "\nAfter, add 9 to that number." + "\nNow, multiply that number by 5." + "\nLastly, add your birthdate day to the number." + "\n\n Input your number:");
System.out.println (number);
//Caculate Birthdate
birthday = (number - 165) / 100;
System.out.println ("Your Birthday is: " + birthday);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment