Thread
:
code to add numbers in an array
View Single Post
Sep 29th, 2007, 7:42 AM
#
2
Jabo
Not a user?
Join Date: Sep 2007
Posts: 245
Rep Power:
1
Quote:
Originally Posted by
truBlu1
(
Toggle Plain Text
)
for(int i = 0; i < n/2; i++)
for(int i = 0; i < n/2; i++)
i<n/2 is the problem i think. it should be, i<(n/2)-1
Jabo
View Public Profile
Find More Posts by Jabo