holding decimal places

Apr 13, 2010 at 11:23pm
Hey i very very new to c++, I am working on a program to have the user enter numbers and have a linear function search to see if the number has been entered in the list.

I have wrote the program and it works for the most part but the test site used decimal places. Mine for some reason when i run it just rounds the numbers off.

I know this should be simple but i really am bad at this.

Thanks,
tman
Apr 13, 2010 at 11:34pm
You are probably using ints. Try using doubles instead.
Apr 13, 2010 at 11:44pm
Thanks for some reason i was getting errors with losing data from changing from int to double and i changed everything
Topic archived. No new replies allowed.