Results 1 to 4 of 4

Thread: java problem

  1. #1
    shrooq is offline Member
    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Exclamation java problem

    hi i want help from you to solve it

    1)Write an application that inputs one number consisting of five digits from the user, separates the number into its individual digits and prints the digits separated from one another by three spaces each. For example, if the user types in the number 42339, the program should print 4 2 3 3 9 . [Hint: You will need to use both division and remainder operations to "pick off" each digit









    2)Assume that int a = 1 and double d = 1.0, and that each expression is independent. What are the results of the following expressions?
    i. a = 46 / 9;
    ii. a = 46 % 9 + 4 * 4 - 2;
    iii. a = 45 + 43 % 5 * (23 * 3 % 2);
    iv. a % = 3 / a + 3;
    v. d = 4 + d * d + 4;
    vi. d + = 1.5 * 3 + (++a);
    vii. d - = 1.5 * 3 + a++;




    3)Write an application that inputs one number consisting of five digits from the user, and prints the digits in reverse order. For example, if the user types in the number 42339, the program should print 93324.













  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: java problem

    Please don't simply dump your homework on this site without asking an answerable question. This site is not for having others do your homework for you. I suggest a) you show us what you've done so far to solve this, and b) ask specific answerable questions about what in particular confuses you. Else we may have to lock this question as a homework dump.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: java problem

    c) Go through the Forum Rules, particularly the third paragraph.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Replies: 3
    Last Post: 09-01-2012, 08:58 PM
  2. Replies: 4
    Last Post: 03-16-2012, 11:29 AM
  3. Small problem with problem with Java, C++ parse program.
    By dragstang86 in forum New To Java
    Replies: 4
    Last Post: 10-30-2011, 03:43 AM
  4. Problem Display Jmenubar Java Se6 u23 versus Java SE6 u22
    By Ravanelly in forum Advanced Java
    Replies: 0
    Last Post: 01-07-2011, 09:36 AM
  5. Problem with Java...
    By mc6415 in forum New To Java
    Replies: 10
    Last Post: 02-22-2010, 12:24 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
  •