...

...
Last edited on
What line?

Just FYI, converting from a double to an int effectively strips the number of its decimal place. That can lead to rounding errors, and eventually your result will be entirely wrong. If you need an accurate result, it will be wron anyway.
Last edited on
sum=sum+a[j]*pow(2.0,k);

i think is here?? It showing this >>
warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
line 112?
but then why i cant get the output from calculation part??
i cant found any problem.. could you please tell me where am i get wrong?
Im actually slightly confused...
nvm, i found it
Last edited on
int a[10],i=0,number,sum=0,j,k=0;
??
The problem isn't with the double to int problem, it just says that because you input a double (2.0) into the pow () function.

Your problem is somewhere else....
Topic archived. No new replies allowed.