0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
~10K People Reached
Favorite Forums
Favorite Tags
3 Posted Topics
I would use Sieve for prime generation. [url]http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes[/url]
So for 30 elements size of average array will be 25 ? You can try something like this: [code] for(int i = 0; i < 5; i++) sum += arr[i]; avg[0] = sum/5; int j = 1; for(int i = 5; i < arrLen; i++){ sum = sum+arr[i]-arr[i-5]; avg[j++] = …
Also scanf would terminate on encountering whitespace so use fgets instead.
The End.
faxo