You've got the gist of it , but there's some fairly fundamental problems:
When is your printf going to be called? Is it really going to show intermediate sums? And how does you printf know how you want variable sum display as?
If sum is representing fractions is int an appropriate type?
In your scanf why is the address of memory location 'n' useful (hint: it isn't!)
Is your formula in the loop reflecting the one...
User Profile
Collapse
-
Cross-Platform File Opening Issue
Hi all,
Just spent some hours banging my head on a brick wall with this one. I've got a program where I have to open a file given its pathname as a String. I've got code that works fine on Mac and Linux, but it'll only work on Windows XP for certain file types - for example .m4a will open with iTunes quite happily, but .avi produces this error:
...Code:java.io.IOException: Failed to open file:/C:/Documents%20and%20Settings/Chris/Desktop/In.Treatment.S01E21.avi.
No activity results to display
Show More
Leave a comment: