To get division result of int in a float....
To calculate percentage i am dividing int but result is always 0.
1 2 3 4 5 6 7
|
float sameEdges_Perc, exteraEdges_Perc, missingEdges_Perc;
int TotalSameEdges, TotalEdges_incr, TotalExteraEdges, TotalMissingEdges;
////////////////////////////
sameEdges_Perc = (float)((TotalSameEdges/TotalEdges_incr)*100);
exteraEdges_Perc = (float)((TotalExteraEdges/TotalEdges_incr)*100);
missingEdges_Perc = (float)((TotalMissingEdges/TotalEdges_incr)*100);
| |
Thanks
sameEdges_Perc = (float)TotalSameEdges /TotalEdges_incr*100;
Last edited on
Topic archived. No new replies allowed.