Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Java only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Java
Stuck!?! I need a program that loops 20 times and sums only even integer index values
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
chithead99
New Member
Join Date:
Mar 2008
Posts:
1
#1
Stuck!?! I need a program that loops 20 times and sums only even integer index values
Mar 28 '08, 03:09 AM
It starts at 1 and must output the sum, It will equal 110
Ganon11
Recognized Expert
Specialist
Join Date:
Oct 2006
Posts:
3651
#2
Mar 28 '08, 03:52 AM
What do you have so far? Do you know how to use loops? How to decide if a number is odd or even? How to use a variable and arithmetic?
Comment
Post
Cancel
pralu
New Member
Join Date:
Mar 2008
Posts:
34
#3
Mar 28 '08, 04:24 AM
Originally posted by
chithead99
It starts at 1 and must output the sum, It will equal 110
can u plz tell me that the values u gonna enter is in array or not......
and if its array then it must b very simple to do
Comment
Post
Cancel
pralu
New Member
Join Date:
Mar 2008
Posts:
34
#4
Mar 28 '08, 04:56 AM
[CODE]
may be this code helps u ....
<Code removed by Admin>
Last edited by
r035198x
;
Mar 28 '08, 06:48 AM
.
Reason:
spoon feeding is against site rules. Don't do it again
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment