Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Hi everyone i need some advice

  1. #1
    Member
    Join Date
    Nov 2013
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hi everyone i need some advice

    Hi,
    i need to create this shape:
    *" "*" "*
    " "*" "*" "
    " "" "*" "" "

    using loops.can you guide me on how to deal with the blank and asterisks?
    its just dont work correctly for me

    thanks for any help:]


  2. #2
    Member
    Join Date
    Oct 2013
    Location
    Manila, Philippines
    Posts
    285
    My Mood
    Amused
    Thanks
    6
    Thanked 64 Times in 61 Posts

    Default Re: Hi everyone i need some advice

    what have you tried? do you already have codes for it? paste your code here and we will do our best to guide you.

  3. #3
    Member
    Join Date
    Nov 2013
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Hi everyone i need some advice

    Quote Originally Posted by dicdic View Post
    what have you tried? do you already have codes for it? paste your code here and we will do our best to guide you.
    For(int i=0,j=1;i<=4;i+=2,j+=2){
    for(int k=i;k<=i;k++)
    Syso..print("*");
    For(int k=j;k<=j;k++)
    Syso..print(" ");
    }

    this is what i got the first line:
    *blank*blank*

    How to continue to modify the second and third lines?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Hi everyone i need some advice

    Please edit your post and wrap your code with code tags:
    [code=java]
    YOUR CODE HERE
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Need some serious advice
    By Rituparna in forum The Cafe
    Replies: 4
    Last Post: September 25th, 2013, 08:26 AM
  2. Need advice
    By kave2 in forum Loops & Control Statements
    Replies: 6
    Last Post: October 12th, 2012, 07:44 PM
  3. Hello, need some advice.
    By mango7777 in forum Member Introductions
    Replies: 1
    Last Post: June 15th, 2012, 08:10 AM
  4. need for some advice
    By kasiopi in forum AWT / Java Swing
    Replies: 6
    Last Post: January 26th, 2011, 10:34 AM
  5. i need some advice ....
    By mdstrauss in forum Java Theory & Questions
    Replies: 8
    Last Post: July 24th, 2009, 02:29 PM