Results 1 to 7 of 7
  1. #1
    vanessa is offline Member
    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0

    Default Need help please

    hi I am very new to the world of programming and need help or guiding for this question
    design a program to test whether anumber inputed by a user is a triangular number

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,924
    Rep Power
    5

    Default Re: Need help please

    Welcome to the Forum! However, we don't write code for folks in this forum. We do help them debug their program and answer questions related to Java. If you don't know what a triangular number is then start by searching the web. Then try and write the code to solve the problem. If you have difficulties, we will still be here.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    vanessa is offline Member
    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0

    Default Re: Need help please

    thanks for the quick response I know what is a triangular number (did my research) my problem is not writing
    the code it is the logic behind it. hope this is a bit clearer

  4. #4
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,924
    Rep Power
    5

    Default Re: Need help please

    There are three basic parts of a program. Input, processing, output. Try filling those in with code to solve you problem.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  5. #5
    allaudin's Avatar
    allaudin is offline Senior Member
    Join Date
    Apr 2013
    Posts
    271
    Rep Power
    0

    Default Re: Need help please

    It will be good if you make your own algorithm ...

  6. #6
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Need help please

    Start by thinking about, or perhaps even writing down, how you as a human being would do what the program is supposed to do. The program logic often flows naturally from that.
    Get in the habit of using standard Java naming conventions!

  7. #7
    vanessa is offline Member
    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0

    Default Re: Need help please

    thanks Kjkrum and Allaudin i realise i do need to go back to basic and start thinking about it logically

Posting Permissions

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