The problem with your code:
double percent = (double) 5600/10000;
is you are assuming that the typecast applies to the 5600. It does not. What actually happens is the division is done (and truncated, because both numbers are ints), and then the final result is cast to a double. So, you get the truncated result. The above code is equivalent to:
double percent = (double) (5600/10000);
What you need for the division to function as you need is for the numerator (first number) to be a double. You can do this by wrapping the cast in parentheses
double percent = ((double) 5600)/10000;
Which is more useful if the numerator is actually a variable. Alternately you can just put a decimal place at the end of the number, if you are dealing with a numerical constant.
double percent = 5600.0/10000;