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 2 of 2

Thread: Got stocked with a code

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Got stocked with a code

    Hey guys i was writing a code for my project and got stocked, if someone can help me i'll be really happy
    that's my code:
    public class project1_4
    {public static void main(String[] args)
    {int i,j,k,m,n,h,size=4;
    System.out.print("|");
    for(j=1;j<=size*2+2;j++)
    System.out.print("\"");
    System.out.print("|");
    System.out.println();
    for(m=1;m<=size;m++)
    {for(k=1;k<=m;k++)
    System.out.print(" ");
    System.out.print("\\");

    {for(i=1;i<=size*2;i++)

    System.out.print(":");
    System.out.print("/");
    System.out.println();


    }
    }
    }
    }

    and the output i need is this Capture1.JPG
    and i can use only nested loops...
    thanks to everyone that will at least read it


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,085
    My Mood
    Mellow
    Thanks
    184
    Thanked 653 Times in 640 Posts

    Default Re: Got stocked with a code

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for newcomers, including a few "house rules" that you'd try to follow when visiting someplace new.

    After you post your code correctly, please describe the problems and ask specific questions that will get you unstuck.

Similar Threads

  1. Replies: 3
    Last Post: April 27th, 2013, 07:19 AM
  2. Replies: 4
    Last Post: January 24th, 2013, 10:20 AM
  3. Replies: 7
    Last Post: January 24th, 2013, 09:41 AM
  4. Replies: 5
    Last Post: November 14th, 2012, 09:47 AM
  5. Replies: 3
    Last Post: September 3rd, 2012, 11:36 AM