Page 3 of 3 FirstFirst 123
Results 41 to 42 of 42
  1. #41
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    JosAH's method was based on your original request for "how to sum all the even numbers < 100".
    He gave you the maths for doing that as a single sum.
    You're original request did not mention having to print those numbers out as well.

    If you have to print out the numbers and then the result then you may as well loop...if not, then you'd be better off using the equation given by JosAH. But only you know the requirements...we can only go based on what you post.

  2. #42
    JackRabbit is offline Member
    Join Date
    Feb 2010
    Posts
    1
    Rep Power
    0

    Default

    Quote Originally Posted by bigpips305 View Post
    I need the program to print

    2+4+6+8+10+...99 =2450
    bigpips305 could you please stop being a jerk on JF or nobody will ever help you. Directions are to sum all the even numbers up to 98. We are here to provide help and feedback.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 13
    Last Post: 08-26-2009, 05:08 AM
  2. Jtable including picture
    By JVposter in forum New To Java
    Replies: 3
    Last Post: 02-27-2009, 12:11 AM
  3. printing two smallest numbers from a series of numbers
    By trofyscarz in forum New To Java
    Replies: 2
    Last Post: 10-15-2008, 12:46 AM
  4. Including JAR in applications
    By bugger in forum New To Java
    Replies: 0
    Last Post: 01-11-2008, 10:36 AM
  5. Including HTML in a JLabel
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-27-2007, 10:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •