Results 1 to 3 of 3
Thread: need to understand code
- 02-17-2011, 02:38 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
need to understand code
Iterating over the numbers 1 .. 10 and write in each an iteration (cycles in the loop) the sum of the current number and all the previous figures. Eg fourth iteration is the number 1 +2 +3 +4 = 10. For the first four iterations will be printed in the console 1, 3, 6, 10. Tip: for an extra variable that you use to store the value from the previous iterations.
What i have got is that i know tthat i have to make a program that adds the preveius numbers with the next like 1+2 = 3 ant then 1+2+3=6 and so on but i dont know were to put it so that the next number apperars in the next line
- 02-17-2011, 02:44 PM #2
Sorry, but you can't just keep posting your homework questions here without showing any real effort. What have you tried? What worked, what didn't work? How didn't it work? Be specific.
Throw together an SSCCE that demonstrates where you're stuck, and we can go from there.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 02-17-2011, 04:21 PM #3
Member
- Join Date
- Jan 2011
- Posts
- 27
- Rep Power
- 0
Similar Threads
-
I cant understand OOP
By eng_hyzoom in forum New To JavaReplies: 4Last Post: 11-19-2010, 04:10 PM -
Trying to understand
By ladykrimson in forum New To JavaReplies: 20Last Post: 10-12-2010, 11:10 PM -
understand the code
By prof.deedee in forum New To JavaReplies: 8Last Post: 11-11-2009, 02:43 AM -
help to understand the ? mark in this code
By carolain79@hotmail.com in forum New To JavaReplies: 2Last Post: 10-13-2009, 06:57 AM -
Trying to understand this code
By new2java2009 in forum New To JavaReplies: 2Last Post: 09-09-2009, 07:18 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks