CHOCOLATE MATH
#1
Registered User
Thread Starter
Join Date: Aug 2005
Location: South Bay
Posts: 1,925
Likes: 0
Received 0 Likes
on
0 Posts
CHOCOLATE MATH
YOUR AGE BY CHOCOLATE MATH
Don't tell me your age; you'd probably lie anyway-but the Hershey Man will know!
YOUR AGE BY CHOCOLATE MATH
This is pretty neat.
DON'T CHEAT BY SCROLLING DOWN FIRST!
It takes less than a minute .
Work this out as you read .
Be sure you don't read the bottom until you've worked it out!
This is not one of those waste of time things, it's fun.
1. First of all, pick the number of times a week that you would like to have chocolate (more than once but less than 10)
2. Multiply this number by 2 (just to be bold)
3. Add 5
4. Multiply it by 50 -- I'll wait while you get the calculator
5. If you have already had your birthday this year add 1760 ..
If you haven't, add 1759..
6... Now subtract the four digit year that you were born.
You should have a three digit number
The first digit of the three digit number is your original number
(i.e., how many times you want to have chocolate each week).
The next two numbers are
YOUR AGE! (Oh YES, it is!!!!!)
THIS IS THE ONLY YEAR (2010) IT WILL EVER WORK.
Don't tell me your age; you'd probably lie anyway-but the Hershey Man will know!
YOUR AGE BY CHOCOLATE MATH
This is pretty neat.
DON'T CHEAT BY SCROLLING DOWN FIRST!
It takes less than a minute .
Work this out as you read .
Be sure you don't read the bottom until you've worked it out!
This is not one of those waste of time things, it's fun.
1. First of all, pick the number of times a week that you would like to have chocolate (more than once but less than 10)
2. Multiply this number by 2 (just to be bold)
3. Add 5
4. Multiply it by 50 -- I'll wait while you get the calculator
5. If you have already had your birthday this year add 1760 ..
If you haven't, add 1759..
6... Now subtract the four digit year that you were born.
You should have a three digit number
The first digit of the three digit number is your original number
(i.e., how many times you want to have chocolate each week).
The next two numbers are
YOUR AGE! (Oh YES, it is!!!!!)
THIS IS THE ONLY YEAR (2010) IT WILL EVER WORK.
#3
Registered User
Join Date: Apr 2007
Location: Los Gatos
Posts: 263
Likes: 0
Received 0 Likes
on
0 Posts
Trying to make since, of how this trick works
Define Variables:
X = number of chochlate bars per week
Y = year you were born
step:algebraic expression
1. X
2. 2X
3. (2X+5)
4. (2X+5)*50 = 100X+250
5. 100X+250+1760 (assuming you allready had birthday this year)
=100X +2010
6. 100X +2010 - Y
So looking at this formula now its kinda obvious how it works.
The hundrendth digit is entirely determined by how many chocholate bars you ate.
And other two digits, how old you are, is calculated by what year it is minus the year you were born in.
Define Variables:
X = number of chochlate bars per week
Y = year you were born
step:algebraic expression
1. X
2. 2X
3. (2X+5)
4. (2X+5)*50 = 100X+250
5. 100X+250+1760 (assuming you allready had birthday this year)
=100X +2010
6. 100X +2010 - Y
So looking at this formula now its kinda obvious how it works.
The hundrendth digit is entirely determined by how many chocholate bars you ate.
And other two digits, how old you are, is calculated by what year it is minus the year you were born in.
#5
Registered User
Join Date: Apr 2007
Location: Los Gatos
Posts: 263
Likes: 0
Received 0 Likes
on
0 Posts
Originally Posted by Quick Silver,May 5 2010, 05:00 PM
THIS IS THE ONLY YEAR (2010) IT WILL EVER WORK.
Trending Topics
#9
import java.util.Scanner;
public class Age {
public static void main(String[] args) {
int x,y,z,a,b,c;
int birthday;
int yearBorn;
Scanner in = new Scanner(System.in);
System.out.println("This program will give you your first number and followed by your age.");
System.out.println("pick the number of times a week that you would like to have chocolate.");
x=in.nextInt();
if(x<1 || x>10){
System.out.println("The number must be between 1 and 10.");
System.exit(-1);
}
y = 2*x;
z = y+5;
a = z*50;
System.out.println("Has your birthday passed this year?. Enter 1 for yes and 2 for no.");
birthday=in.nextInt();
if (birthday == 1){
b = a+1760;
}
else if (birthday == 2){
b = a+1759;
}
System.out.println("What year were you born?");
yearBorn=in.nextInt();
c = b-yearBorn;
System.out.println("First number is how many times you want chocolate per week. Second is your age!");
System.out.println©;
}
}
*****************************
This program will give you your first number and followed by your age.
pick the number of times a week that you would like to have chocolate.
5
Has your birthday passed this year?. Enter 1 for yes and 2 for no.
1
What year were you born?
1988
First number is how many times you want chocolate per week. Second is your age!
522
public class Age {
public static void main(String[] args) {
int x,y,z,a,b,c;
int birthday;
int yearBorn;
Scanner in = new Scanner(System.in);
System.out.println("This program will give you your first number and followed by your age.");
System.out.println("pick the number of times a week that you would like to have chocolate.");
x=in.nextInt();
if(x<1 || x>10){
System.out.println("The number must be between 1 and 10.");
System.exit(-1);
}
y = 2*x;
z = y+5;
a = z*50;
System.out.println("Has your birthday passed this year?. Enter 1 for yes and 2 for no.");
birthday=in.nextInt();
if (birthday == 1){
b = a+1760;
}
else if (birthday == 2){
b = a+1759;
}
System.out.println("What year were you born?");
yearBorn=in.nextInt();
c = b-yearBorn;
System.out.println("First number is how many times you want chocolate per week. Second is your age!");
System.out.println©;
}
}
*****************************
This program will give you your first number and followed by your age.
pick the number of times a week that you would like to have chocolate.
5
Has your birthday passed this year?. Enter 1 for yes and 2 for no.
1
What year were you born?
1988
First number is how many times you want chocolate per week. Second is your age!
522