Thanks, I keep forgetting these basic principles. I promoted the array vec[ ] to float and now it works.
After some modifications and patches, here's the end result:...
User Profile
Collapse
-
Division (C language)
Hello
I'm dividing consecutive prime numbers (larger over lesser) and I get 1.0000(....) for all of them.
Does it have anything to do with runnig gcc on windows? I've tried the calculator applet that comes with the OS and it works properly...
The program prints a column with the order, a second with each prime, then the difference between two consecutives, the cumulative sum and the last one was supposed to be the ratio...
No activity results to display
Show More
Leave a comment: