15 Comments

  1. Nicole

    1
    121
    12321
    1234321
    123454321
    12345654321
    1234567654321
    12345654321
    123454321
    1234321
    12321
    121
    1
    please help me with this one 🙁

    Reply
  2. stuti

    0
    101
    21012
    3210123
    432101234
    send me code for this

    Reply
    • Richard

      /*

      0
      101
      21012
      3210123
      432101234
      */
      import java.util.Scanner;
      public class Pattern
      {
      public static void main(String[] args)
      {
      Scanner scanner =new Scanner(System.in);
      System.out.println(“Enter No of rows : “);
      int n=scanner.nextInt();
      int k=0;
      boolean addCheck;
      for(int i=0;i<n;i++)
      {
      k=i;
      addCheck=false;
      for(int j=0;j0)
      {
      System.out.print(k);
      if(!addCheck)
      {
      k–;
      }
      else
      {
      k++;
      }
      }
      else if(k==0)
      {
      System.out.print(k);
      addCheck=true;
      k++;
      }
      }
      System.out.println();
      }
      }
      }

      Reply
  3. SAURABH KUMAR YADAV

    Help me print this pattern
    12345
    21234
    32123
    43212
    54321

    Reply
  4. saptaparna basu

    help me
    0
    1 2
    3 4 5
    9 8 7 6
    5 4 3
    2 1
    0

    Reply

  5. help to this one/

    1
    212
    32123
    4321234
    543212345
    65432123456
    7654321234567
    65432123456
    543212345
    4321234
    32123
    212
    1

    Reply
  6. aravinth

    1
    2 2
    3 3 3
    4 4 4 4
    5 5 5 5 5

    Reply
    • KIRUBHA

      int rowCount=5;
      for(int i=1;i<=rowCount;i++){
      for(int j=1;j<=i;j++){
      System.out.print(i);
      }
      System.out.println();
      }

      Reply
  7. Honey Villamor

    This one?
    1
    2 1 2
    3 2 1 2 3
    4 3 2 1 2 3 4
    5 4 3 2 1 2 3 4 5
    4 3 2 1 2 3 4
    3 2 1 2 3
    2 1 2
    1

    Thanks.

    Reply
  8. sangeetha

    help me for this pattern
    1
    3 2
    6 5 4
    10 9 8 7
    15 14 13 12 11

    Reply
  9. ganesh

    how to print this patterns
    1
    11
    121
    1331

    and
    #
    #*
    #*#
    #*#*
    #*#*#
    please help

    Reply

    • #
      #*
      #*#
      #*#*
      #*#*#
      // the code is here

      class Main
      {
      public static void main(String args[])
      {
      int n=5;
      for(int i=0;i<n;i++)
      {
      for(int j=0;j<=i;j++)
      {
      if(j%2==0)
      System.out.print("#");
      else
      System.out.print("*");
      }
      System.out.println();
      }
      }
      }

      Reply
  10. S .Pranav Balaji

    Help me print this pattern

    1 2 3 4 5 4 3 2 1
    1 2 3 4 * 4 3 2 1
    1 2 3 * * * 3 2 1
    1 2 * * * * * 2 1
    1 * * * * * * * 1

    Reply
  11. Matej Rastocky

    And pytagoras triangle ? 😮

    Reply

Leave a Reply