5/100 is done in integer arithmetic, which yields 0 before conversion. Try
double variable = 5.0/100;
If 5 is in a variable x (of integer type), then use:
variable = (double)x/100;
or
variable = ((double)x)/100;
to make the intent clear (thanks John!)
or
variable = x/100.0;