c# - Division in double variable returning always zero -


i trying perform division , multiplication between 2 values , save them in double variable.

multiplication working fine division returning 0 ?

why ?

here code :

double max_load =(convert.todouble(ddl_gene_desc.selectedvalue)*0.8)*(80/100); 

i checked using breakpoint multiplication fine (80/100) returning 0.

can 1 please me ?

thanks in advance.

the result of 80/100 (both integers) 0.

change 80.0/100.0


Comments

Popular posts from this blog

javascript - Why Selenium can't find an element that is graphically visible -

java - How to compare two classes -

mysql - Gateway Timeout Error on Insert 70000 record using Hibernate in Java -