Hello guys/gals I need some help in my program that calculate the total numbers by dividing into three, first is 80% of total 2nd is 10% of total and thr last is 10% of total. I have tried it to convert to double but if the total is 5 the first one will output 4 and the 2nd is 0 and 3rd is 0 which is wrong because I am expecting the total of output as it is. Here is my code
Double total = 5;
Double a,b,c,tot;
a = total*0.80;
b = total*0.10;
c = total*0.10;
tot = a+b+c;
Int convert = Convert.ToInt32(tot)