This content has been marked as final. Show 5 replies
You can cast number3 into an int
But in either case, you're going to lose some data.
answer = number * number2 * (int)number3;
Losing data, I mean 1.5 will become 1.
I'm not sure if that answered your question.
Were you expecting 4.5 as the outcome?
If so, then just change answer to a double type.
Message was edited by: