Results 1 to 3 of 3
  1. #1
    logonin is offline Member
    Join Date
    Nov 2015
    Posts
    8
    Rep Power
    0

    Default Extreme beginner question

    I am taking a programming class and as of today we moved onto java. So we have to do a few problems and I have no idea how to do the last two. I know they are modulus but I'm not sure how to solve them. Any help would be appreciated. Thanks :)

    "Given the following declarations, what result is stored in each of the listed assignment statements?

    int iResult, num1 = 25, num2 = 40, num3 = 17, num4 = 5;
    double fResult, val1 = 17.0, val2 = 12.78;

    8. iResult = num3 % num4;

    9. iResult = num3 % num2"

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Extreme beginner question

    what result is stored in each of the listed assignment statements?
    Try writing a small, simple program with those statements followed by a print statement to print out the results. That will show you the results of the statements.

    I assume you have the JDK on your PC so you can compile and execute a java program.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: Extreme beginner question

    Do you know what modulus does?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. A beginner question about SAX
    By Noobverse in forum New To Java
    Replies: 2
    Last Post: 03-15-2013, 07:03 AM
  2. A beginner question.
    By MhilleXD in forum New To Java
    Replies: 2
    Last Post: 10-02-2012, 10:41 AM
  3. Beginner GUI question
    By stuckonjava in forum New To Java
    Replies: 4
    Last Post: 02-16-2012, 11:16 PM
  4. Java Question [Beginner Question]
    By joker760 in forum New To Java
    Replies: 3
    Last Post: 12-13-2011, 04:01 PM
  5. Beginner Java question
    By DanK in forum New To Java
    Replies: 3
    Last Post: 04-27-2009, 04:29 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
  •