When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
11 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
so given 128.234, would the answer be 8?
if this is the case, you would break the problem down into two steps. 1) get the integer part of the decimal, and 2) get the last digit of this number
why spoil the fun of finding the answer on their own when they only asked for guidance 
you both should remove your answers @grand hound @cedar basin
#include <iostream>
int main(int, char**) {
std::cout << ((int)128.234) % 10 << std::endl;
}
8

then you would use modf to get fractional component. multiply by 10 and cast to an int
This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.