The following is the code
float lc = lcount/argc*100;
return lc;
I tried to get 362.5 but the result is 300
The following is the code
float lc = lcount/argc*100;
return lc;
I tried to get 362.5 but the result is 300
because initially it will computer division(because at the left of equation and having same precedence as multiplication ) lcount/argc(29/8=3) and then multiplied by 100. And at the last the computed result will be stored in floating format.
Your problem might be you are thinking initially it will compute 29/8=3.625 which wouldn't.