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

C# C# Basics (Retired) Perfect Integers and Doubles

Mytch Hagan
Mytch Hagan
1,876 Points

I don't really understand the question.

What?

What's the question?

Quizzes have multiple questions, and the order of the questions get shuffled every time you take the quiz.

Mytch Hagan
Mytch Hagan
1,876 Points

int a = 3; int b = 2; double c = 3.5; double y = a / b * c; Submit Answer

1 Answer

andren
andren
28,558 Points

The question is asking you what y equals after the code that is shown is executed. In other words what is the result of this "3 / 2 * 3.5" math equation.

Due to the way math in C# works when you mix integers and doubles the answer is something different from what you would normally expect. Try to figure out the answer using what you learned about math in C# in the previous videos. if you can't figure out the answer then just reply to this post and I'll provide you with the solution.