Go to Top

Friday 27 May 2011

To print a pattern in Java

Question 13 : Write a program in Java to print the following pattern : 

1
22
333
4444
55555

Java Program : 


public class pattern_1
{
 public static void main()
 {
     int i,j;
     for(i=1;i<=5;i++)
     {
         for(j=i;j>=1;j--)
         {
             System.out.print(i);
            }
            System.out.print("\n");
        }
    }
}

Output : 


1
22
333
4444
55555

Note : Use the calculator and the notepad provided, at the top, to dry run the program.

240 comments:

  1. really helpfull

    ReplyDelete
  2. #####
    #@@@#
    #@@@#
    #@@@#
    #####
    please solve it

    ReplyDelete
  3. Hi Aman ! Here's your program. Be sure to contact me again through comments if there are any mistakes and like this blog on facebook. Visit the link below :

    http://icse-java.blogspot.com/2012/01/visitors-request-3.html

    ReplyDelete
  4. 1
    12
    123
    234
    3451
    45123 plzzz solve it

    ReplyDelete
    Replies
    1. There seems to be a problem with your pattern. Please review it and send it to me again at this e-mail address :

      icse.java.blogspot@gmail.com

      Delete
    2. Class @
      Fuck
      India
      Condom
      Etc

      Delete
  5. tell me is there any way that i could low the graphics of a particular game so that i could play it on my computer because every tome i install a game it gave an error that pixel shader 2.0 not found.

    ReplyDelete
  6. write a program to print the first 20 no. of the following pattern:-
    1,3,6,11,20...

    ReplyDelete
    Replies
    1. Your question might be a bit wrong. Since difference between 1 & 3 = 2, 3 & 6 = 3, 6 & 11 = 5, 11 & 20 = 9 <===. The last term should be 18. Also please find out the next term of it if you can, because the next difference might be 9, if taking the odd number logic and 11 if taking the prime number logic. If you think that the question is right, please reply.

      Delete
    2. next term should be 37
      Logic:-
      main series:.......1....3....6......11......20......37.......70
      diff btwn elemnts:..2....3.....5.......9.......17......33
      diff btwn elmnts :.....1....2.......4......8........16......32
      in the last line next element is= 2*prev elemnt
      i hope wat ive written is understandable

      Delete
  7. how to print this:_

    1
    1 1
    1 2 1
    1 3 3 1
    1 4 6 4 1

    ReplyDelete
    Replies
    1. http://icse-java.blogspot.in/2012/02/visitors-request-6.html

      That's your program.

      Delete
  8. 1.W.A.P. to Calculate LCM of n numbers and HCM of n numbers using array.

    ReplyDelete
  9. w.a.p. to perform Linear Search.

    ReplyDelete
    Replies
    1. import java.io.*;
      public class LinearSearch
      {
      int Array[]=new int[10];
      int i,no,flag;
      InputStreamReader in = new InputStreamReader(System.in);
      BufferedReader br =new BufferedReader(in);
      public void accept()throws IOException
      {

      System.out.println("Enter 10 numbers");
      for(i=0;i<10;i++)
      {
      Array[i]=Integer.parseInt(br.readLine());
      }
      }
      public void search()throws IOException
      {
      flag=0;
      System.out.println("Enter the number you want to search");
      no=Integer.parseInt(br.readLine());
      for(i=0;i<10;i++)
      {
      if(no==Array[i])
      {
      flag=1;
      break;
      }
      }
      if(flag==1)
      System.out.println(no+" is found at position "+(i+1));
      else
      System.out.println("Search unsuccessful");
      }
      public void main() throws IOException
      {
      LinearSearch A=new LinearSearch();
      A.accept();
      A.search();
      }
      }

      Delete
  10. WAP to print
    55555
    4444
    333
    22
    1

    ReplyDelete
    Replies
    1. class deep
      {
      public static void main
      {int a=5
      for(int i=5;i>=5;i--)
      {
      for(int j=1;j>=;j--)
      {System.out.print(a);
      }system.out.println();a--;}}}

      Delete
    2. import java util.*;
      class pattern
      {
      public static void main(String arg[])
      {
      int i,n,j;
      n=1;
      for (i=5;i>=n;i--)
      {
      for(j=5;j>=i;j--)
      {
      System.out.print(j);
      }
      System.out. println(i);
      }
      }
      }

      Delete
    3. Fuck ur mother
      ...😂😂😂😂

      Delete
    4. Bad very good😉😉😉

      Delete
  11. 1
    121
    12321
    1234321
    plz help me out with this!!

    ReplyDelete
    Replies
    1. import java.util.*;
      class Pattern
      {
      public static void main(String args[])
      {
      int i,j,k;
      for(i=1;i<=4;i++)
      {
      for(j=1;j<=i;j++)
      {
      System.out.print(j);
      }
      for(k=i-1;k>=1;k--)
      {
      System.out.print(k);
      }
      System.out.print("\n");
      }
      }
      }

      Delete
    2. This comment has been removed by the author.

      Delete
  12. 1
    111
    11111
    111
    1
    how to prit this

    ReplyDelete
    Replies
    1. import java.io.*;
      public class pattern
      {
      int r,c,a;
      public void main() throws IOException
      {
      InputStreamReader in=new InputStreamReader(System.in);
      BufferedReader br=new BufferedReader (in);
      System.out.println("Enter the no. of rows you want");
      a=Integer.parseInt(br.readLine());
      System.out.println();
      for(r=1;r<=a;r++)
      {
      for(c=1;c<=r;c++)
      System.out.print("1 " );
      System.out.println();
      }
      for(r=a-1;r>=1;r--)
      {
      for(c=1;c<=r;c++)
      System.out.print("1 ");
      System.out.println();
      }
      }
      }

      Delete
    2. public class Pattern{

      public static void main(String []args){
      int r,c,a=3;
      for(r=1;r<=a;r++)
      {
      for(c=1;c<=2*r-1;c++)
      System.out.print("1 " );
      System.out.println();
      }
      for(r=a-1;r>=1;r--)
      {
      for(c=1;c<=2*r-1;c++)
      System.out.print("1 ");
      System.out.println();
      }

      }
      }

      Delete
  13. print this pattern plzzz

    0
    01
    024
    0369
    0481216
    05101520
    061218243036
    07142128354249
    0816243240485664
    091827364554637281

    plzzzz solve it

    ReplyDelete
    Replies
    1. import java.io.*;
      public class pattern
      {
      int r,m,a;
      public void main() throws IOException
      {
      InputStreamReader in=new InputStreamReader(System.in);
      BufferedReader br=new BufferedReader (in);
      System.out.println("Enter the no. of rows you want");
      a=Integer.parseInt(br.readLine());
      System.out.println();
      for(r=1;r<=a;r++)
      {
      System.out.print("0");
      for(m=1;m<=r;m++)
      System.out.print(r*m);
      System.out.println();
      }
      }
      }

      Delete
    2. package logicalPrograms;
      import java.util.Scanner;

      public class Pattern2 {
      public static void main(String []args)
      {
      Scanner sc = new Scanner(System.in);

      System.out.println("How many table pattern you want : ");
      int num = sc.nextInt();
      for(int i=0;i<=num;i++)
      {
      int sum =0;
      for(int j=0;j<=i;j++)
      {
      System.out.print(sum);
      sum+=i;
      }
      System.out.println("\n");
      }
      }

      }

      Delete
  14. print
    123454321
    1234 4321
    123 321
    12 21
    1 1

    ReplyDelete
    Replies
    1. import java.io.*;
      public class pattern
      {
      public void main() throws IOException
      {
      InputStreamReader in = new InputStreamReader(System.in);
      BufferedReader br =new BufferedReader(in);
      int r,c,sp=2,s;
      System.out.println("Enter the no of rows you want");
      int n=Integer.parseInt(br.readLine());
      for(r=1;r<=n-1;r++)
      System.out.print(r+" ");
      for(r=n;r>=1;r--)
      System.out.print(r+" ");
      System.out.println();
      for(r=n-1;r>=1;r--)
      {
      for(c=1;c<=r;c++)
      System.out.print(c+" ");
      for(s=sp;s>=1;s--)
      System.out.print(" ");
      for(c=r;c>=1;c--)
      System.out.print(c+" ");
      System.out.println();
      sp=sp+4;
      }
      }
      }

      Delete
  15. pls solve this..

    ***********
    * *
    * *
    * *
    ***********

    ReplyDelete
  16. plz help to print this

    5432112345
    5432 2345
    543 345
    54 45
    5 5

    ReplyDelete
    Replies
    1. import java.io.*;
      public class pattern
      {public void main() throws IOException
      {
      InputStreamReader in = new InputStreamReader(System.in);
      BufferedReader br =new BufferedReader(in);
      int r,c,sp=0,s;
      System.out.println("Enter the no of rows you want");
      int n=Integer.parseInt(br.readLine());
      System.out.println();
      for(r=1;r<=n;r++)
      {
      for(c=n;c>=r;c--)
      System.out.print(c+" ");
      for(s=sp;s>=1;s--)
      System.out.print(" ");
      for(c=r;c<=n;c++)
      System.out.print(c+" ");
      System.out.println();
      sp=sp+4;
      }

      }
      }

      Delete
    2. public class pattern
      {
      public static void main(String args[])
      {
      int i,j,k;
      for(i=1;i<=5;i++)
      {
      for(j=5;j>=i;j--)
      {
      System.out.print(j);
      }
      System.out.print(" ");

      for(k=i;k<=5;k++)
      {
      System.out.print(k);
      }
      System.out.println();
      }
      }
      }

      Delete
  17. *
    * * *
    * * * * *
    * * * * * * *
    * * * * *
    * * *
    *
    hey guys i need this to be printed can anyone solve this plssssssssss
    thanks in advance

    ReplyDelete
    Replies
    1. import java.io.*;
      public class pattern
      {
      int r,c;
      public void main() throws IOException
      {
      InputStreamReader in=new InputStreamReader(System.in);
      BufferedReader br=new BufferedReader (in);
      for(r=1;r<=4;r++)
      {
      for(c=1;c<=r;c++)
      System.out.print("* " );
      System.out.println();
      }
      for(r=3;r>=1;r--)
      {
      for(c=1;c<=r;c++)
      System.out.print("* ");
      System.out.println();
      }
      }
      }

      Delete
  18. How to print this?
    1
    121
    12321
    1234321
    123454321
    1234321
    12321
    121
    1
    This is when n=9.

    ReplyDelete
    Replies
    1. import java.io.*;
      public class pattern
      {
      public void main()throws IOException
      {
      int r,c,a;
      InputStreamReader in = new InputStreamReader(System.in);
      BufferedReader br =new BufferedReader(in);
      System.out.println("How many rows do you want?");
      a=Integer.parseInt(br.readLine());
      for(r=1;r<=a;r++)
      {
      for (c=1;c<=r;c++)
      System.out.print(c+" ");
      for(c=r-1;c>=1;c--)
      System.out.print(c+" ");
      System.out.println();
      }
      for(r=a-1;r>=1;r--)
      {
      for (c=1;c<=r;c++)
      System.out.print(c+" ");
      for(c=r-1;c>=1;c--)
      System.out.print(c+" ");
      System.out.println();
      }
      }
      }

      Delete
    2. Write a program to accept a string and perform the following based on user’s choice:
      1. Count and print no. of vowels
      2. Count and print no. of consonants
      3. Count and print no. of digits
      4. Count and print no. of words
      pls... solve it

      Delete
    3. W.A.P to print the following pattern:
      If n=5
      1
      121
      12321
      1234321
      123454321
      1234321
      12321
      121
      1
      pls.... solve this..

      Delete
    4. public class program7
      {
      public static void main ()
      {
      int loop_1,loop_2;
      for(loop_1=1;loop_1<=5;loop_1++)
      {
      for (loop_2=1;loop_2<=loop_1;loop_2++)
      System.out.print(loop_2);
      for(loop_2=loop_1-1;loop_2>=1;loop_2--)
      System.out.print(loop_2);
      System.out.println();
      }
      for(loop_1=5-1;loop_1>=1;loop_1--)
      {
      for (loop_2=1;loop_2<=loop_1;loop_2++)
      System.out.print(loop_2);
      for(loop_2=loop_1-1;loop_2>=1;loop_2--)
      System.out.print(loop_2);
      System.out.println();
      }
      }
      }

      Delete
  19. a1
    a2 b3
    a4 b5 c6
    a7 b8 c9 d10
    plz solve it..

    ReplyDelete
    Replies
    1. import java.io.*;
      public class pattern
      {
      public void main() throws IOException
      {
      InputStreamReader in = new InputStreamReader(System.in);
      BufferedReader br =new BufferedReader(in);
      int r,c,sum=1,s;
      System.out.println("Enter the no of rows you want");
      int n=Integer.parseInt(br.readLine());
      for(r=1;r<=n;r++)
      {
      sum+=r;
      s=sum-r;
      for(c=1;c<=r;c++)
      {

      System.out.print((char)(96+c)+""+s+" ");
      s++;
      }
      System.out.println();
      }
      }
      }

      Delete
  20. plz help me
    987654321
    87654321
    7654321
    654321
    54321
    4321
    321
    21
    1

    ReplyDelete
    Replies
    1. import java.io.*;
      public class pattern
      {
      public void main()throws IOException
      {
      int r,c,a;
      InputStreamReader in = new InputStreamReader(System.in);
      BufferedReader br =new BufferedReader(in);
      System.out.println("How many rows do you want?");
      a=Integer.parseInt(br.readLine());
      for(r=a;r>=1;r--)
      {
      for (c=r;c>=1;c--)
      System.out.print(c+" ");
      System.out.println();
      }
      }
      }

      Delete
  21. get output as
    0
    10
    101
    0101
    01010

    ReplyDelete
  22. how to do it


    555555555
    4444 4444
    333 333
    22 22
    1 1
    22 22
    333 333
    4444 4444
    555555555

    ReplyDelete
    Replies
    1. import java.io.*;
      public class pattern
      {
      public void main() throws IOException
      {
      InputStreamReader in=new InputStreamReader(System.in);
      BufferedReader br=new BufferedReader (in);
      int a,r,c;
      System.out.println("Enter the no. of rows you want");
      a=Integer.parseInt(br.readLine());
      System.out.println();
      for(r=a;r>=1;r--)
      System.out.print(a);
      for(r=a;r>=1;r--)
      System.out.print(a);
      System.out.println();
      for(r=a-1;r>=1;r--)
      {
      for(c=1;c<=r;c++)
      System.out.print(r);
      System.out.print(" ");
      for(c=1;c<=r;c++)
      System.out.print(r);
      System.out.println();
      }
      for(r=2;r<=a-1;r++)
      {
      for(c=1;c<=r;c++)
      System.out.print(r);
      System.out.print(" ");
      for(c=1;c<=r;c++)
      System.out.print(r);
      System.out.println();
      }
      for(r=a;r>=1;r--)
      System.out.print(a);
      for(r=a;r>=1;r--)
      System.out.print(a);
      }
      }

      Delete
  23. please help me with this code:
    00000
    00123
    01357
    025811

    ReplyDelete
  24. * * * * *
    * * * *
    * * *
    * *
    *
    * *
    * * *
    * * * *
    * * * * *

    ReplyDelete
  25. 1 3 5 7 9
    3 5 7 9 1
    5 7 9 1 3
    7 9 1 3 5
    9 1 3 5 7
    plz solve this for me

    ReplyDelete
    Replies
    1. /*
      1 3 5 7 9
      3 5 7 9 1
      5 7 9 1 3
      7 9 1 3 5
      9 1 3 5 7
      */
      public class pattern3
      {
      public static void main()
      {
      int i,j,k;
      for(i=1;i<=10;i+=2)
      {
      for(k=i;k<=10;k+=2)
      {
      System.out.print(k+" ");
      }
      for(j=1;j<=i-2;j+=2)
      {
      System.out.print(j+" ");
      }
      System.out.println();
      }
      }
      }

      Delete
    2. This doesn't work....
      Please review your code..

      Delete
    3. This comment has been removed by the author.

      Delete
    4. The right code
      import java.util.Scanner;
      public class s_13579_35791
      {
      static void main()
      {
      Scanner ob=new Scanner(System.in);
      int k=1;
      for (int i=1;i<=5;i++)
      {
      for (int j=1;j<=5;j++)
      {
      System.out.print(k);
      if (k==9)
      k=1;
      else
      k+=2;
      }
      k+=2;
      System.out.println();
      }
      }
      }
      Output:
      13579
      35791
      57913
      79135
      91357

      Delete
    5. public class pattern
      {
      public static void main()
      {
      int i, j, k;
      for(i=1;i<=9;i+=2)
      {
      for(j=i;j<=9;j+=2)
      System.out.print(j);
      for(k=1;k<i;k+=2)
      System.out.print(k);
      System.out.println();
      }}}

      Delete
    6. well, this is a simpler code for
      /*
      13579
      35791
      57913
      79135
      91357
      */
      class imp
      {
      public static void main(String args[])
      {
      String s="13579";
      int l=s.length();
      for(int i=0;i<l;i++)
      {
      System.out.print(s.substring(i));
      System.out.print(s.substring(0,i));
      System.out.println();
      }
      }
      }

      Delete
  26. pls tell me how to print the pattern
    12345
    22345
    33345
    44445
    55555

    ReplyDelete
  27. plz tell me how to print the pattern
    13579
    35791
    57913
    79135
    91357

    ReplyDelete
    Replies
    1. class pat1{
      public static void main(String args[])
      {
      String n="1 3 5 7 9";
      int l=n.length();

      for(int i=0;i<l;i=i+2)
      {
      String w=n.substring(i,l);
      String q=n.substring(0,i);
      System.out.print(w+" ");
      System.out.print(q+" ");
      System.out.println();
      }
      }
      }

      Delete
    2. /* 1 3 5 7 9
      3 5 7 9 1
      5 7 9 1 3
      7 9 1 3 5
      9 1 3 5 7*/
      public class pattern
      {
      public static void main()
      {
      int i,j,k;
      for(i=1;i<=10;i+=2)
      {
      for(k=i;k<=10;k+=2)
      {
      System.out.print(k+" ");
      }
      for(j=1;j<=i-2;j+=2)
      {
      System.out.print(j+" ");
      }
      System.out.println();
      }
      }
      }

      Delete
  28. plz tell he how to print the pattern
    1
    10
    101
    1010
    10101

    ReplyDelete
    Replies
    1. /* 1
      * 1 0
      * 1 0 1
      * 1 0 1 0
      * 1 0 1 0 1
      */
      public class pg_166_Q19_d_
      {
      public static void main(String args[])
      {
      int i,j,k;
      for(i=1;i<=5;i++){
      for(j=1;j<=i;j++){
      k=(j%2==0)?0:1;
      System.out.print(k+" ");
      }
      System.out.println();
      }
      }
      }

      Delete
  29. plz tell me for this one
    WAPto compute charges for sending parcels where the charges are as follows :
    for the first 1kg RS.25
    for additional weight of 500gms or fraction thereof Rs. 10
    Input the weight of a parcel from the user , display the amount to be paid by the customer

    ReplyDelete
    Replies
    1. you should use slab based program

      Delete
    2. import....
      class...
      {
      public....
      {
      BufferedReader......
      System.out.println("enter the weight of a parcel").
      double w=Double.parseDouble.....;
      int ch=0;
      int w=(int)(w*1000);
      w-=1000;
      ch+=25;
      while(w>0)
      {
      w-=500;
      ch+=10;
      }
      System.out.println(ch);
      }
      }
      this is the right program

      Delete
  30. plz.... help me to solve this........
    1
    121
    12321
    1234321
    123454321
    1234321
    12321
    121
    1

    ReplyDelete
  31. Can ayone plese hep me with this pattern. If array is to be used, then use single dimensional array please.
    RRRRRRRRR
    ROOOOOOR
    ROHHHHOR
    ROH I I I HOR
    ROH I T I HOR
    ROH I I I HOR
    ROHHHHOR
    ROOOOOOR
    RRRRRRRRR

    ReplyDelete
  32. I have some more programme which I am unable to do it I am class 9 student please tell me the site from where I can find all programme if u will tell me I will e-mail u all the programme please help me............and if u now any book which can help me in java please inform me

    ReplyDelete
  33. $
    ###
    >>>>>
    <<<<<<<<
    ?????????

    ReplyDelete
  34. this pattern will be in centre

    ReplyDelete
  35. code for
    1
    3 1
    5 3 1
    7 5 3 1
    9 7 5 3 1

    ReplyDelete
    Replies
    1. class pattern
      {
      public static void main(String arg[])
      {
      for(int i=1;i<=9;i+=2)
      {
      for(int j=i;j>=1;j-=2)
      {
      System.out.print(" "+j);
      }
      System.out.println();
      }
      }
      }

      Delete
  36. here's my calc program ( dunno if it is the right place to post, but still here it is ) :
    http://rjt-rockx.yolasite.com/calc.php
    hope it helps !

    ReplyDelete
  37. Please help
    Pattern is
    1,11,111..........
    must continue till there are 10 1s

    ReplyDelete
    Replies
    1. I hope this is what you require

      class patternabc{
      void main (){
      for (int i=1;i<=5;i++){
      for (int j=1;j<=i;j++){
      System.out.print("1");}
      System.out.println();}
      }}

      Delete
    2. Hello anyone I challenge to all Bloggers if they have the potential then solve this problem other wise close this blog page
      can any one solve this problem Print the word BHUPENDRA in star pattern or any other word given by user it should be printed in horizontal way

      Delete
    3. What exactly do you mean to say by 'star pattern' ?

      Delete
  38. 123454321
    1234 4321
    123 321
    12 21
    1 1
    sir plz provide the code for dis pattern

    ReplyDelete
  39. * *
    *
    * *
    plz provide the code for dis pattern

    ReplyDelete
    Replies
    1. class prog
      {
      public static void main()
      {
      for(int x=1;x<=3;x++)
      {
      if(x%2==0)
      System.out.print("*");
      else
      System.out.print("**");
      System.out.println();
      }
      }
      }

      Delete
  40. 1 1
    12 21
    123 321
    1234321

    ReplyDelete
    Replies
    1. public class InternetPattern {
      public static void main(String[] args) {
      int[][]arr={{1,1},{12,21},{123,321},{1234321}};
      for(int i=0;i<arr.length;i++)
      {
      for(int j=0;j<arr[i].length;j++)
      {
      System.out.print(arr[i][j]+" ");

      }
      System.out.println();
      }
      }
      }

      Delete
  41. This comment has been removed by the author.

    ReplyDelete
  42. Replies
    1. class pattern
      {
      public static void main(String arg[])
      {
      for(int i=5;i>=1;i--)
      {
      for(int j=i;j<=5;j++)
      {
      System.out.print(" "+j);
      }
      System.out.println();
      }
      }
      }

      Delete
  43. how to print this pattern:-
    13579
    3579
    579
    79
    9

    ReplyDelete
    Replies
    1. import java.util.*;
      Class Kaustav
      {
      Public static void main(String args[])
      {
      for(i=1;i<=5;i+=2)
      {
      for(j=i;j<=5;j+=2)
      {
      Sop(i);
      }
      Sopl();
      }
      }
      }



      Delete
  44. Hello can any one solve this problem Print the word BHUPENDRA in star pattern or any other word given by user

    ReplyDelete
  45. Hello can any one solve this problem Print ★ shape pattern inside this print asterisk symbol

    ReplyDelete
  46. help me plzzzz....
    J
    EE
    UUU
    LLLL
    BBBBB

    ReplyDelete
  47. CAN YOU PLZZZ refer me the best book for ICSE computer applications

    ReplyDelete
  48. Hello anyone I challenge to all Bloggers if they have the potential then solve this problem other wise close this blog page
    can any one solve this problem Print the word BHUPENDRA in star pattern or any other word given by user it should be printed in horizontal way

    ReplyDelete
  49. Hello everyone I challenge to all Bloggers if they have the potential then solve this problem other wise close this blog page
    can any one solve this problem Print the word BHUPENDRA in star pattern or any other word given by user it should be printed in horizontal way

    ReplyDelete
  50. Hello anyone I challenge to all Bloggers if they have the potential then solve this problem other wise close this blog page
    can any one solve this problem Print the word BHUPENDRA in star pattern or any other word given by user it should be printed in horizontal way

    ReplyDelete
  51. Hello anyone I challenge to all Bloggers if they have the potential then solve this problem other wise close this blog page
    can any one solve this problem Print the word BHUPENDRA in star pattern or any other word given by user it should be printed in horizontal way

    ReplyDelete
  52. plz help to print
    this pattern

    1 2 3
    1 2 3
    1 2 3

    ReplyDelete
    Replies
    1. import java.util.*;
      Class ak
      {
      Public static void main(String args[])
      {
      for(int a=1;a<=3;a++)
      {
      for(int b=1;b<=a;b++)
      {
      Sop(b);
      }
      Sopl();
      }
      }
      }










      Delete
  53. How to PRINT THIS:
    I I
    I I I I
    I I I I I

    ReplyDelete
  54. 1
    232
    34543
    4567654
    567898765

    need help plz!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    ReplyDelete
  55. 0
    101
    21012
    3210123
    432101234
    54321012345
    Pls help to solve this

    ReplyDelete
  56. Please help to print this pattern

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

    ReplyDelete
  57. Can any one tell me a trick to solve any given pattern.......plz as fast as possible really required for my exams......Thanks in advance 😊

    ReplyDelete
  58. plz do this :- 6 6 6 6 6 6
    5 5 5 5 5
    4 4 4 4
    3 3 3
    2 2
    1

    ReplyDelete
    Replies
    1. public class NumPtr {

      /**
      * @param args the command line arguments
      */
      public static void main(String[] args) {

      for(int i=5;i>=1;i--){
      for(int j=i;j>=1;j--){
      System.out.print(i+"");

      }
      System.out.println();
      }
      }
      }

      Delete
  59. *********
    *
    *
    *
    *
    *********
    plezz do this

    ReplyDelete
  60. Can you give me the answer
    1000A
    010B0
    00C00
    0D010
    E0001

    ReplyDelete
  61. Please do as soon as possible.....have an exam tomorrow

    ReplyDelete
  62. 13579
    35791
    57813
    79135
    91357

    ReplyDelete
    Replies
    1. /* 1
      * 1 0
      * 1 0 1
      * 1 0 1 0
      * 1 0 1 0 1
      */
      public class pg_166_Q19_d_
      {
      public static void main(String args[])
      {
      int i,j,k;
      for(i=1;i<=5;i++){
      for(j=1;j<=i;j++){
      k=(j%2==0)?0:1;
      System.out.print(k+" ");
      }
      System.out.println();
      }
      }
      }

      Delete
  63. Please answer this:-
    1 3 5 7 9
    3 5 7 9
    5 7 9
    7 9
    9

    ReplyDelete
    Replies
    1. import java.io.*;
      class Pattern
      {
      public static void main (String args[])
      {
      int n=1;
      for (int i=1; i<=5; i++)
      {
      for (int j=n; j<=9; j=j+2)
      {
      System.out.print (j);
      }
      System.out.println (" ");
      n++
      }
      }
      }

      Delete
  64. please answer the above program fast...because i have an exam this monday

    ReplyDelete
    Replies
    1. class pattern
      {

      public static void main(String[] args)
      {

      int i, j;

      for(i=1;i<=9;i=i+2)
      {
      for(j=i;j<=9;j=j+2)
      {
      System.out.print(j+" ") ;
      }

      System.out.println() ;

      }

      }

      }

      Delete
    2. Thank you very much....I have another program will you please answer it

      Delete
  65. WAP to do the following patterns:-

    a.) 1
    2 1
    3 2 1
    4 3 2 1
    5 4 3 2 1
    b.)
    1 2 3 4 5
    1 2 3 4
    1 2 3
    1 2
    1

    c.) 5 4 3 2 1
    5 4 3 2
    5 4 3
    5 4
    5

    d.)

    \






































































































































    WAp in JAVA TO PRINT:_

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
































































































    ReplyDelete
  66. 13579
    35791
    57813
    79135
    91357

    ReplyDelete
    Replies
    1. Plz do this pattern.

      Delete
    2. /* 1
      * 1 0
      * 1 0 1
      * 1 0 1 0
      * 1 0 1 0 1
      */
      public class pg_166_Q19_d_
      {
      public static void main(String args[])
      {
      int i,j,k;
      for(i=1;i<=5;i++){
      for(j=1;j<=i;j++){
      k=(j%2==0)?0:1;
      System.out.print(k+" ");
      }
      System.out.println();
      }
      }
      }

      Delete
  67. How to bring this output
    123456787654321

    ReplyDelete
  68. Solve this:
    tiger
    ige
    g
    ige
    tiger

    The word could be anything inputted by the user

    Solve this plzzzz
    And earn a cookie! :D

    ReplyDelete
  69. Solve this:
    tiger
    ige
    g
    ige
    tiger

    The word could be anything inputted by the user

    Solve this plzzzz
    And earn a cookie! :D

    ReplyDelete
  70. generate the following series
    a)
    2,5,10,17,26.............n terms

    b)
    11,22,33,44.................n terms

    c)
    0,4,18,48,100..........n terms

    ReplyDelete
    Replies
    1. answer to b)

      class prog
      {
      public static void main(int n)
      {int x=11;
      for(int t=1;t<=n;t++)
      {
      System.out.println(x);
      x=x+11;
      }
      }
      }

      Delete
  71. *****
    * *
    * *
    *
    please solve it....plz plz

    ReplyDelete
  72. This comment has been removed by the author.

    ReplyDelete
  73. 1 2 3 4
    5 6 7
    8 9
    10

    Please solve this

    ReplyDelete
  74. 1 2 3 4
    5 6 7
    8 9
    10

    Please solve this

    ReplyDelete
  75. This comment has been removed by the author.

    ReplyDelete
  76. This comment has been removed by the author.

    ReplyDelete
  77. 12345
    1234
    123
    12
    1
    Please give code...

    ReplyDelete
    Replies
    1. class Pattern1
      {
      public static void main()
      {
      for(int r=5;r>=1;r--)
      {
      for(int c=1;c<=r;c++)
      System.out.print(c);

      System.out.println();
      }
      }
      }

      Delete
  78. can u plz help to print the following series
    1
    13
    135
    1357

    ReplyDelete
  79. Replies
    1. I am also searching for that bro...

      Delete
    2. class Pattern2
      {
      public static void main()
      {
      String n="ICSE";
      int i;
      for(i=1;i<=n.length();i++)
      {
      System.out.println(n.substring(0,i));
      }
      }
      }

      Delete
  80. how to print this:_
    i
    cc
    sss
    eeee

    ReplyDelete
  81. Wap to print the following patter of stars * *
    * *
    *
    * *
    * *

    ReplyDelete
  82. How to print :
    1234321
    123*321
    12***21
    1*****1

    ReplyDelete
    Replies
    1. import java.io.*;
      class patterns1correction
      {public static void main (String args[])throws IOException
      {int sp=-1,x=4;
      for (int i=1;i<=4;i++)
      {
      for (int j=1;j<=x;j++)
      {
      System.out.print(j);
      }
      for (int j=1;j<=sp;j++)
      {
      System.out.print("*");

      }
      if(i==1)
      {
      x=x-1;
      }
      for (int j=x;j>=1;j--)
      {System.out.print(j);
      }
      if(i!=1)
      {
      x--;
      }

      sp=sp+2;
      System.out.println();
      }
      }
      }

      Delete
  83. I want to about this pattern
    13579
    35791
    57913
    79135
    91357

    ReplyDelete
  84. please help me in this:
    15 14 13 12 11
    10 9 8 7
    6 5 4
    3 2
    1

    ReplyDelete
  85. please hel me to solve this prog.
    ********
    *** ***
    ** **
    * * if you solve it thn FUCK OFF

    ReplyDelete
  86. 0
    1 1
    2 3 5
    8 13 21 34

    ReplyDelete
  87. how to print this plz tell

    x x x x x
    x x
    x 0 x
    x x
    x x x x x

    ReplyDelete
    Replies
    1. it has a mistake during publishing the program is like a square made by x and has 0 in the centre.

      Delete
  88. Someone plz help me
    To write a java program to convert string to integers and vice versa

    ReplyDelete
  89. Hello,
    WAP to print the following pattern :
    1
    12
    123
    1234
    12345
    123456

    Thanks,
    Anonymous

    ReplyDelete
  90. 12345
    23451
    34512
    45123
    51234

    ReplyDelete
  91. 5,55,555,5555,55555,......
    source code for this pattern??

    ReplyDelete
  92. plz help
    13579
    1357
    135
    13
    1

    ReplyDelete
  93. help!!!!!!!!!!!
    bluej
    blue
    blu
    bl
    u

    ReplyDelete
  94. Replies
    1. class Pattern2
      {
      public static void main()
      {
      String n="ICSE";
      int i;
      for(i=1;i<=n.length();i++)
      {
      System.out.println(n.substring(0,i));
      }
      }
      }

      Delete
  95. Sample Input:APPLE
    Sample Output:
    P
    PPL
    APPLE
    -----------------
    Plz give a bluej code for the abv pyramid pattern.

    ReplyDelete
  96. solve this for me:

    A B C D E
    A B C D A
    A B C A B
    A B A B C
    A A B C D

    ReplyDelete
    Replies
    1. class imp
      {
      public static void main(String args[])
      {
      String s="ABCDE";
      int l=s.length();
      for(int i=0;i<l;i++)
      {
      System.out.print(s.substring(i));
      System.out.print(s.substring(0,i));
      System.out.println();
      }
      }
      }

      Delete
  97. This comment has been removed by the author.

    ReplyDelete
  98. To print Tha pattern of given word
    Input - class
    Output -sssss
    ssss
    aaa
    ll
    c

    ReplyDelete
  99. please help me..
    Input : 5
    Output :

    M*****M
    M*M*M*M
    M**M**M
    M*****M
    M*****M


    ReplyDelete
  100. Help kr do yrr koi

    1
    21
    321
    4321
    54321

    ReplyDelete
  101. Wap to print the following pattern
    school
    schoo
    scho
    sch
    sc
    s
    Plz reply

    ReplyDelete
  102. please solve this:
    MALAYALAM
    ALAYALA
    LAYAL
    AYA
    Y

    ReplyDelete
  103. Please solve this
    1234567
    23456
    345
    4
    345
    23456
    1234567

    ReplyDelete
  104. Please Solve This :
    1
    2 6
    3 7 10
    4 8 11 13
    5 9 12 14 15

    ReplyDelete
  105. help me with this..

    1
    2 6
    3 7 10
    4 8 11 13
    5 9 12 14 15

    ReplyDelete
  106. how to program this by scanner*666666
    *55555
    *4444
    *333
    *22
    *1

    ReplyDelete
  107. how to write this one!
    1 20
    2 19
    3 18
    4 17
    5 16

    ReplyDelete
  108. 2 4 6 8 10
    2 4 6 8 10
    2 4 6 8 10
    2 4 6 8 10
    2 4 6 8 10
    How to write this??????

    ReplyDelete
  109. I need a program to print the following

    ** ***** ***** **
    **** ** * ** * ****
    ** ** ** * ** * ** **
    ****** ** * ** * ******
    ** ** ** * ** * ** **
    ** ** ** * ** * ** **
    ** ** ***** ***** ** **

    Can anyone please help me out

    ReplyDelete
  110. Plzz help me
    1
    212
    32123
    4321234
    32123
    212
    1
    Its very complicated for me

    ReplyDelete
  111. This comment has been removed by the author.

    ReplyDelete
  112. Plus solve this
    1
    121
    12321
    1234321
    12321
    121
    1

    ReplyDelete


  113. can you please print
    0
    12
    345
    543
    21
    0



    ReplyDelete
  114. Give program to print this pattern
    I
    IC
    ICS
    ICSE

    ReplyDelete
  115. How to print this using String:
    J
    EJ
    UEJ
    LUEJ
    BLUEJ

    ReplyDelete
  116. How to print this pattern.

    9204605198
    920460519
    92046051
    9204605
    920460
    92046
    9204
    920
    92
    9

    ReplyDelete
  117. How to print this pattern.

    9204605198
    920460519
    92046051
    9204605
    920460
    92046
    9204
    920
    92
    9

    ReplyDelete
  118. WRITE A PROGRAM TO PRINT DAXIT NUMBER AND PALINDROME NUMBER USING SWITCH CASE STATEMENT/MENU DRIVEN.
    DAXIT NUMBER MEANS THE SUM OF ITS DIGITS POWERED WITH THEIR RESPECTIVE POSITION IS EQUAL TO THE ORIGINAL NUMBER
    EG 135, 1^1+3^2+5^3=135
    I HOPE THAT YOU KNOW PALINDROME NUMBER.

    ReplyDelete
  119. PATTERN =
    *********
    *******
    *****
    ***
    *
    ***
    *****
    *******
    *********

    PLEASE PRINT THIS

    ReplyDelete
  120. Please help me to print
    BLUE
    BLU
    BL
    B

    ReplyDelete
  121. no calculator and notepad are provided

    ReplyDelete
  122. Plz solve this
    13579
    35791
    57813
    79135
    91357

    ReplyDelete
  123. bro pla teach me coding easy and fast

    ReplyDelete
  124. Please solve this using nested loop in java :

    *
    * #
    * # *
    * # * #
    * # * # *

    ReplyDelete

ShareThis