26 Comments

  1. Ravi

    How to print
    1
    ab
    234
    cdef
    56789

    Reply
  2. pritam

    Help me out
    5 4 3 2 1 * 1 2 3 4 5
    4 3 2 1 * * * 1 2 3 4
    3 2 1 * * * * * 1 2 3
    2 1 * * * * * * * 1 2
    1 * * * * * * * * * 1

    Reply
    • sudheersai

      class r
      {
      public static void main(String args[])
      {
      int s=1;
      for(int i=5;i>=1;i–)
      {
      for(int j=i;j>=1;j–)
      {
      System.out.print(j+” “);
      }
      for(int k=1;k<=s;k++)
      {
      System.out.print("* ");
      }
      for(int h=1;h<=i;h++)
      {
      System.out.print(h+" ");
      }
      System.out.println("");
      s+=2;
      }
      }
      }

      Reply
  3. Kajal

    Can u hepl with the following pattern
    A
    BA
    CBA
    DCBA

    Reply
  4. Shreyashi Mukherjee

    I
    IC
    ICS
    ICSE

    Reply
  5. google user

    how to print
    Y
    PY
    PPY
    APPY
    HAPPY

    Reply
  6. yankho

    how can I make star patterns of letters ..E.g “ABBA”

    Reply
  7. Sai Sarvani

    I need the output :10 20 30 40
    20 30 40 10
    30 40 10 20
    40 10 20 30

    Reply
    • Anirudh

      I want this program

      Reply
  8. oumar

    hello could u helps me out ….
    this pattrn

    11
    2112
    321123
    43211234

    Reply
  9. dhanu

    how to print
    ******
    ** **
    * *
    ** **
    ******

    Reply
  10. kanimozhi m

    1 2 3 2 1 0
    4 3
    5 6 7 6 5 4

    8*9*9*8*7 please solve this problem

    Reply
  11. vicky

    How to print this pattern
    1
    24
    135
    2468
    13579
    Guys

    Reply
    • balaji

      public class MyClass {
      public static void main(String args[]) {
      int i=1;
      int m=2;
      for (int j=1; j<=5; j++){
      int l=m;
      int p=i;
      for (int k=1; k<=j; k++){

      if ((j%2)==0){
      System.out.print(l);
      l=l+2;
      }
      if ((j%2)==1){
      System.out.print (p);
      p=p+2;
      }
      }
      System.out.println();
      }

      }
      }

      Reply
  12. Biswajit Sahu

    L
    LO
    LOT
    LOTU
    LOTUS
    PLS slove this problem

    Reply
    • balaji

      public class MyClass {
      public static void main(String args[]) {
      String s=”LOTUS”;
      char [] a=s.toCharArray();
      String n=””;
      for (int i=0; i<5; i++){
      n=n+a[i];
      System.out.println(n);

      }

      }
      }

      Reply
    • Ranjith M

      import java.util.Scanner;
      public class First {
      public static void main(String args[])
      {
      System.out.println(“Enter the String”);
      Scanner sc=new Scanner(System.in);
      String n=sc.nextLine();
      for(int i=0;i<n.length();i++)
      {
      for(int j=0;j<=i;j++)
      {
      System.out.print(n.charAt(j));
      }
      System.out.println("");
      }
      }
      }

      Reply
  13. Shiv

    ABCDEFGFEDCBA
    ABCDEF FEDCBA
    ABCDE EDCBA
    ABCD DCBA
    ABC CBA
    AB BA
    A A

    Reply
  14. siva

    ABCDE
    ABCD
    ABCD
    ABC
    AB
    A

    Reply
    • Max

      AAAAA
      ABBBB
      ABCCC
      ABCDD
      ABCDE

      Reply

Leave a Reply.. if you are adding code, include within