Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Kelvin Knighton
6,168 PointsCreate a variable named "onehundred"
Create a variable named "onehundred" and assign the correct numeric value 100 to it using only variables a, b, and c and the common numeric operators.
var a = 1, b = 2, c = 4; my answer: var onehundred = c + c + b / b * c + c + a * c;
keep in mind I'm not good with math.
please help me
5 Answers
Arthur Verschaeve
20,816 PointsYour answer was only 20. Multiply your answer with 5, and you got 100. http://jsfiddle.net/H3p87/
Yan Cruz
20,439 PointsI used this one
var onehundred = (a+b+c) * (a+b+c) + (a+b+c) + (a+b+c) + (a+b+c) + (a+b+c) + (a+b+c) + (a+b+c) + (a+b+c) + a + a; and it worked
Raymundo Figueroa
Front End Web Development Techdegree Student 25,606 PointsShorten answer : (a + c) * ( a + c) * ( b+ b);
Kelvin Knighton
6,168 Pointsthank you Arthur.
Marcel Genal
21,433 Points(a + c) * ( a + c) * c;