Results 1 to 4 of 4
Thread: Computing the sum
- 08-12-2008, 02:27 PM #1
Member
- Join Date
- Aug 2008
- Posts
- 1
- Rep Power
- 0
- 08-12-2008, 03:15 PM #2
Not clear,
freedom exists in the world of ideas
- 08-12-2008, 04:21 PM #3
Do some research with a search for examples of using Scanner and for( loops. Then write some code and come back with the code and your questions.
- 08-13-2008, 06:00 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
You have to try something first. This is not a big task at all. Read some basis about scanner and loops. I'll give some guide line to you.
First using scanner object collect the starting and ending values. Store them in two variables.
Then loop from starting value to ending value by incrementing the starting value by one. At the same time add the incremented starting value added with all previous values.
I hope it's clear to you. Try something first, then we can help you.
Similar Threads
-
Computing prime numbers in Java
By Java Tip in forum java.langReplies: 0Last Post: 04-12-2008, 08:39 PM -
Computing the area of a triangle using Heron's Formula
By Java Tip in forum java.langReplies: 0Last Post: 04-12-2008, 08:39 PM -
distributed computing in java
By pushpik in forum Advanced JavaReplies: 0Last Post: 03-31-2008, 06:50 PM -
Computing Fibonacci numbers recursively
By Java Tip in forum Java TipReplies: 0Last Post: 01-22-2008, 08:20 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks