output as zero

 

hi, as below is a simple code i had create. But y output will be zero ? it suppose be 87.5

int int_lower_shadow = 70;
int int_upper_shadow = 81;

Print(((int_lower_shadow / int_upper_shadow) * 100));

Thanks

 
foongshen:

hi, as below is a simple code i had create. But y output will be zero ? it suppose be 87.5

Thanks

Because int_lower_shadow / int_upper_shadow is less than 1 and an int of less than 1 is 0

Read this: Type Casting