So the user gets to input trupmenineDalis it is a int type variable, and pagrindinisDaugiklis is a const of 8, naujaTrupmenineDalis is a float type variable.
After doing the math i would expect to receive a float type answer, but instead i get 0. Do you have any ideas why it might be the problem?
integer division returns an integer.
cast one of the arguments naujaTrupmenineDalis = static_cast<double>(trupmenineDalis % 10) / pagrindinisDaugiklis;