Results 1 to 7 of 7
  1. #1
    saetia is offline Member
    Join Date
    Apr 2010
    Posts
    3
    Rep Power
    0

    Default Help with deficient, perfect, or abundant integer

    I am trying to write a program that will allow me to see if a number is deficient, perfect, or abundant. I am having a horrible time and put in countless hours and have no idea what the heck I am doing.

    I am putting the program in :

    -----------------------------------------------------------
    <head>
    <title>Classify Numbers</title>

    <script type = "text/javascript">


    <!--
    var n, message

    function classifyNumber()

    { // begin function
    message = "To be implemented"




    document.frmProgOutput.classification.value = message
    // end function
    }



    // -->

    </script>

    </head>

    <body>


    <form name = frmProgOutput>



    <h3>Classify Numbers</h3>



    <label>Enter Number</label>

    <input type="text" size = "10" onChange
    = "n = parseInt(this.value)"/>

    <br />

    <input type="button" value="Classify Number"
    onclick="classifyNumber()" />
    <br />

    <textarea cols = "50", rows = "2" name = "classification">
    </textarea>

    </form>

    </body>
    </html>

    -----------------------------------------------------------

    If anyone can help me out that would be great, I have gone back and forth for hours now and can not figure out how to do this.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    saetia is offline Member
    Join Date
    Apr 2010
    Posts
    3
    Rep Power
    0

    Default

    I was told to use loops to solve for this. I mean we have just been using basic java and working with loops. I am not really sure what Java page servers are...

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    JSP - Java Server Pages.

    First of all try to implement your requirements in basic Java (J2SE). Then you can think about how to put it into a web page. Working on JSP you have to learn a lot, like working on with the servers and all. Start in basic steps.

  5. #5
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,528
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by saetia View Post
    <script type = "text/javascript">
    This is a Java forum, sorry.

    kind regards,

    Jos

  6. #6
    saetia is offline Member
    Join Date
    Apr 2010
    Posts
    3
    Rep Power
    0

    Default

    oh crap I didn't even realize there was a difference between java and java script. Sorry guys not trying to flood youre forums I know pretty much nothing about this programming obviously I just took an intro internet programming class as a general elective and am completely lost.

    Ill try to find a java script forum my bad.

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    It's better that you got the clear idea about it. Please look at on a JS forum. Actually there is a huge difference between Java and JavaScript, word Java not the same at all.

Similar Threads

  1. help with perfect squares
    By AmplifiedKid in forum New To Java
    Replies: 1
    Last Post: 09-19-2009, 07:44 PM
  2. Java Developer - Need Job - This is Perfect match
    By ravisrivastava2003 in forum Java Software
    Replies: 0
    Last Post: 12-10-2008, 07:35 PM
  3. Efficient Perfect Number
    By Lite3864 in forum New To Java
    Replies: 4
    Last Post: 11-23-2008, 01:07 AM
  4. Way to Java Perfect
    By Javaisinmyblood in forum New To Java
    Replies: 1
    Last Post: 02-06-2008, 11:28 PM
  5. Perfect Squares
    By divyachaparala in forum New To Java
    Replies: 4
    Last Post: 02-05-2008, 09:21 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
  •