i want add number in list of numbers after adding number in list, 20 percent of whole list.
the goal set width of first column absolute (20%) , relative others columns while creating table in itextsharp pdf.
for example here list {10,30,20,20}. should add in 20% of whole sum of list, 20 ( 20+10+30+20+20 = 100, 20/100 -> 20%).
some basic math 0.20 = x / (sum + x) give x = sum/4. enumerable.sum
give of result:
listofint.add (listofint.sum()/4);
Comments
Post a Comment