I am trying to calculate the percentage value. The values for which the percentage needs to be calculated, they are coming from a database, they are coming fine.
This is what i am doing:
percent = (cCount/totalCount)*100;
Although i am getting values for cCount and totalCount, the total percentage always comes zero.
The 'percent' variable is of float type.
Looks like a simple thing, but am i missing something really basic here.
The values i am getting i.e. cCount and totalCount are both float.
This is what i am doing:
percent = (cCount/totalCount)*100;
Although i am getting values for cCount and totalCount, the total percentage always comes zero.
The 'percent' variable is of float type.
Looks like a simple thing, but am i missing something really basic here.
The values i am getting i.e. cCount and totalCount are both float.