Results 1 to 4 of 4

Thread: Ok i am lost

  1. #1
    jaisan72980 is offline Member
    Join Date
    Jan 2011
    Posts
    4
    Rep Power
    0

    Default Ok i am lost

    MY INSTRUCTOR GAVE US AN ASSIGNMENT AND I AM COMPLETELY LOST PLEASE HELPME

    Part A

    Write an application that prints to the following four lines to the screen:

    1
    1 2
    1 2 3
    1 2 3 4


    You must use at least one of each of the following statements in your solution:

    System.out.print
    System.out.println
    System.out.printf

    Part B

    Write an application that gets two integers from the user and prints out whether it is a multiple of the second.

    Submit a zip file of your NetBeans project that includes all files.

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    This is not nearly as difficult as you may think, however, I would like to see how you are thinking of trying it, it you give code please use code tags.

    for the first one, if you are allowed to use loops, use 2.

    The second part is fairly simple, to find if a number is evenly divisible use %(modulus), it returns the remainder of two numbers after division, what remaider is returned when two numbers are evenly divisible?

  3. #3
    user0 is offline Senior Member
    Join Date
    Dec 2010
    Posts
    100
    Rep Power
    0

    Default

    As sunde mentioned, this is a very simple task, however, please show what you have written so far so that we can help you from there. Also, don't forget to use code tags when you post code here.

    Best,
    --user0--

  4. #4
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default

    Yeah, we're not a 'do it for you' homework service - but we are here to help. What don't you understand?

Similar Threads

  1. Lost with subclasses
    By vinyacam in forum New To Java
    Replies: 3
    Last Post: 05-09-2010, 07:12 PM
  2. I'm lost :(
    By leonardjr in forum New To Java
    Replies: 8
    Last Post: 03-03-2009, 04:18 AM
  3. So Lost
    By kandt in forum New To Java
    Replies: 5
    Last Post: 12-13-2008, 09:55 PM
  4. Has Java lost its way?
    By alexj44 in forum Advanced Java
    Replies: 4
    Last Post: 09-23-2008, 01:26 PM
  5. Lost my javadocs
    By orchid in forum Eclipse
    Replies: 3
    Last Post: 04-30-2008, 09:45 PM

Posting Permissions

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