Search C Program | nimishsoft@gmail.com

Number Patterns


12345
1234
123
12
1
12345
2345
345
45
5
Code of above pattern


Code of above pattern


54321
4321
321
21
1
54321
5432
543
54
5
Code of above pattern


Code of above pattern


1
12
123
1234
12345
5
45
345
2345
12345
Code of above pattern


Code of above pattern


1
21
321
4321
54321
5
54
543
5432
54321
Code of above pattern


Code of above pattern


1
22
333
4444
55555
5
44
333
2222
11111
Code of above pattern


Code of above pattern


55555
4444
333
22
1
11111
2222
333
44
5
Code of above pattern


Code of above pattern


12345
4321
123
21
1
1234567
12345
123
1
Code of above pattern


Code of above pattern


1
01
101
0101
13579
3579
579
79
9
Code of above pattern


Code of above pattern


1
2 4
1 3 5
2 4 6 8
1 3 5 7 9
55555
45555
34555
23455
12345
Code of above pattern


Code of above pattern


1
23
456
78910
1
10
101
1010
10101
Code of above pattern


Code of above pattern


1 
2 6 
3 7 10 
4 8 11 13 
5 9 12 14 15
1
123
12345
1234567
Code of above pattern


Code of above pattern


12344321
123**321
12****21
1******1
    1
  2 3 4
5 6 7 8 9
Code of above pattern


Code of above pattern


1   2   3   4   5   6   7   8   9   10
36  37  38  39  40  41  42  43  44  11
35  64  65  66  67  68  69  70  45  12
34  63  84  85  86  87  88  71  46  13
33  62  83  96  97  98  89  72  47  14
32  61  82  95  100 99  90  73  48  15
31  60  81  94  93  92  91  74  49  16
30  59  80  79  78  77  76  75  50  17
29  58  57  56  55  54  53  52  51  18
28  27  26  25  24  23  22  21  20  19
Code of above pattern


11111
2222
333
22
1
5432*
543*1
54*21
5*321
*4321
Code of above pattern


Code of above pattern


1
121
12321
1234321
0 
909 
89098 
7890987 
678909876 
56789098765 
4567890987654 
345678909876543 
23456789098765432 
1234567890987654321 
Code of above pattern


Code of above pattern


1        1
12      21
123    321
1234  4321
1234554321
    1
   21
  321
 4321
54321 
Code of above pattern


Code of above pattern


1
232
45654
78910987
1
2*2
3*3*3
4*4*4*4
4*4*4*4
3*3*3
2*2
1
Code of above pattern


Code of above pattern


11
12 13
13 14 15
14 15 16 17
             1
           2 3
         4 5 6
      7 8 9 10
11 12 13 14 15
Code of above pattern


Code of above pattern


    5
   54
  543
 5432
54321
1
212
32123
4321234
Code of above pattern


Code of above pattern


1
23
345
4567
56789
  1  2  3  4  5
  6  7  8  9
 10 11 12
 13 14
 15
Code of above pattern


Code of above pattern


1234
2341
3421
4321
11111
0000
111
00
1
Code of above pattern


Code of above pattern


                  1  
              4   9  16 
         25  36  49  64  81 
    100 121 144 169 196 225 256 
289 324 361 400 441 484 529 576 625
11111
1   1
1   1
1   1
11111 
Code of above pattern


Code of above pattern


    1 
   1 2 
  1 2 3 
 1 2 3 4 
1 2 3 4 5
    1
   123
  12345
 1234567
123456789
 1234567
  12345
   123
    1
Code of above pattern


Code of above pattern


*000*000*
0*00*00*0
00*0*0*00
000***000
5 5 5 5 5 5 5 5 5 
5 4 4 4 4 4 4 4 5 
5 4 3 3 3 3 3 4 5 
5 4 3 2 2 2 3 4 5 
5 4 3 2 1 2 3 4 5 
5 4 3 2 2 2 3 4 5 
5 4 3 3 3 3 3 4 5 
5 4 4 4 4 4 4 4 5 
5 5 5 5 5 5 5 5 5
Code of above pattern


Code of above pattern


1
1 1
1 2 1
1 3 3 1 
1 4 6 4 1
1
2 4
3 6 9
4 8 12 16
5 10 15 20 25
6 12 18 24 30 36
7 14 21 28 35 42 49
8 16 24 32 40 48 56 64
9 18 27 36 45 54 63 72 81
10 20 30 40 50 60 70 80 90 100
Code of above pattern


Code of above pattern


1 
1 2 
3 5 8 
13 21 34 55 
89 144 233 377 610
11111
10001
10001
10001
11111
Code of above pattern


Code of above pattern


1 2 3 4 5 
2 1 2 3 4 
3 2 1 2 3 
4 3 2 1 2 
5 4 3 2 1 
1
3 2
4 5 6
10 9 8 7
11 12 13 14 15
Code of above pattern


Code of above pattern


1
232
34543
4567654
567898765 
1     1
 2   2 
  3 3  
   4   
  3 3  
 2   2 
1     1
Code of above pattern


Code of above pattern

1     
2 6    
3 7 10   
4 8 11 13  
5 9 12 14 15  
        1       
      1 2 1     
    1 2 3 2 1   
  1 2 3 4 3 2 1 
1 2 3 4 5 4 3 2 1
Code of above pattern


Code of above pattern

      1
    2   2
  3       3
4           4
  3       3
    2   2
      1
1  2  3  4  5  
16          6  
15          7  
14          8  
13 12 11 10 9 
Code of above pattern


Code of above pattern


N=39714

3 9 1 7 4
9 1 7 4
1 7 4
7 4
4
Code of above pattern





Related Links:
Star Patterns
http://cbasicprogram.blogspot.in/2012/03/star-patterns.html

Alphabet Patterns
http://cbasicprogram.blogspot.in/2013/03/alphabet-patterns.html

Series Programs
http://cbasicprogram.blogspot.in/2013/01/series-program.html

1,014 comments:

  1. thanks for this one...

    ReplyDelete
  2. please bro i need code for this pattern..

    1
    123
    12345
    1234567
    12345
    123
    1

    ReplyDelete
    Replies
    1. for(i=1;i<=7;i+=2)
      {
      for(j=1;j<=i;j++)
      printf("%d",j);
      printf("\n");
      }
      for(i=5;i>=1;i-=2)
      {
      for(j=1;j<=i;j++)
      printf("%d",j);
      printf("\n");
      }

      Delete
  3. 1 5 8 10
    2 6 9
    3 7
    4
    reply plzzzz!!

    ReplyDelete
    Replies
    1. for(i=1;i<=4;i++)
      {
      printf("%d",k=i;);
      for(j=4;j>i;j--)
      printf("%d",k+=j);
      printf("\n");
      }

      Delete
    2. 7 8 9 10
      4 5 6
      2 3
      1
      Please send the logic for this pattern

      Delete
  4. ohhh!!! thanx a lot...

    ReplyDelete
  5. can any one tell how to print this patterns ?
    Q1:
    11111
    22222
    33333
    44444
    55555

    Q2:
    12345
    12345
    12345
    12345

    ReplyDelete
    Replies
    1. 11111
      22222
      33333
      44444
      55555
      for(i=1;i<=5;i++)
      {
      for(j=1;j<=5;j++)
      printf("%d",i);
      printf("\n");
      }

      12345
      12345
      12345
      12345
      for(i=1;i<=5;i++)
      {
      for(j=1;j<=5;j++)
      printf("%d",j);
      printf("\n");
      }

      Delete
  6. what is logic of pattent

    1234321
    123 321
    12 21
    1 1

    ReplyDelete
    Replies
    1. void main()
      {
      int i,j,k;
      for(i=4;i>=1;i--)
      {
      for(j=1;j<=4;j++)
      {
      if(j<=i)
      printf("%d",j);
      else
      printf(" ");
      }
      for(j=3;j>=1;j--)
      {
      if(j<=i)
      printf("%d",j);
      else
      printf(" ");
      }
      printf("\n");
      }
      }

      Delete
    2. a million thanks

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

      Delete
  7. please help me out with this
    z y x w v w x y z
    z y x w x y z
    z y x y z
    z y z
    z

    ReplyDelete
    Replies
    1. void main()
      {
      int i,j;
      clrscr();
      for(i=5;i>=1;i--)
      {
      for(j=1;j<=i;j++)
      printf("%c ",123-j);
      for(j-=2;j>=1;j--)
      printf("%c ",123-j);
      printf("\n");
      }
      getch();
      }

      Delete
  8. How to print this pyramid

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

    ReplyDelete
    Replies
    1. this should work, not tested ...
      for(i=5;i>=1;i--)
      {
      for(j=5;j>i;j--)
      {
      printf(" ");
      }
      for(k=1;k<=i;k++)
      {
      printf("%d ",k);
      }
      printf("\n");
      }

      Delete
    2. it workd..i wantd fr * patrn.. thanx !

      Delete
    3. It works.. thank you

      Delete
    4. it works but upto
      1 2 3 4 5 6
      1 2 3 4 5
      1 2 3 4
      1 2 3
      1 2
      1

      Delete
  9. How to print this
    ABCDEFEDCBA
    ABCDE.EDCBA
    ABCD…..DCBA
    ABC……….CBA
    AB……………BA
    A……………...A
    plzz help!! Dots are spaces …

    ReplyDelete
    Replies
    1. void main()
      {
      int i,j,k;
      for(i=5;i>=1;i--)
      {
      for(j=1;j<=5;j++)
      {
      if(j<=i)
      printf("%c",'A' + j-1);
      else
      printf(" ");
      }
      for(j=4;j>=1;j--)
      {
      if(j<=i)
      printf("%c",'A' + j-1);
      else
      printf(" ");
      }
      printf("\n");
      }
      }

      Delete
    2. Awesome thinking man!!!!!!!!

      Delete
  10. Replies
    1. int main()
      {
      int i, j;
      for(i=1;i<=4;i++)
      {
      printf("%d\n",i);
      for(j=1;j<=i;j++)
      {
      printf("%d",j);
      }
      printf("\n");
      }
      }

      Delete
  11. Replies
    1. void main()
      {
      int i, j;
      for(i=1;i<=5;i++)
      {
      for(j=1;j<=i;j++)
      {
      if(i%2==0)
      printf("%d",i/2);
      else
      printf("%c",'A' + i/2);
      }
      printf("\n");
      }
      }

      Delete
  12. Pls help me.....

    54321
    _5432
    __543
    ___54
    ____5


    ____5
    ___45
    __345
    _2345
    12345

    _is space....

    ReplyDelete
    Replies
    1. 54321
      _5432
      __543
      ___54
      ____5

      main()
      {
      int i,j;
      for(i=5;i>=1;i--)
      {
      for(j=5;j>=1;j--)
      {
      if(j>i)
      printf(" ");
      else
      printf("%d",j);
      }
      printf("\n");
      }
      }

      Delete
    2. ____5
      ___45
      __345
      _2345
      12345

      main()
      {
      int i,j;
      for(i=5;i>=1;i--)
      {
      for(j=1;j<=5;j++)
      {
      if(j<i)
      printf(" ");
      else
      printf("%d",j);
      }
      printf("\n");
      }
      }

      Delete
  13. 54321
    *4321
    **321
    ***21
    ****1

    12345
    *2345
    **345
    ***45
    ****5

    ****5
    ***45
    **345
    *2345
    12345

    Pls help me with these programs pls...i need space where * is written.

    Thank you

    ReplyDelete
    Replies
    1. 54321
      *4321
      **321
      ***21
      ****1

      main()
      {
      int i,j;
      for(i=5;i>=1;i--)
      {
      for(j=5;j>=1;j--)
      {
      if(i<j)
      printf(" ");
      else
      printf("%d",j);
      }
      printf("\n");
      }
      }

      Delete
    2. 12345
      *2345
      **345
      ***45
      ****5

      main()
      {
      int i,j;
      for(i=1;i<=5;i++)
      {
      for(j=1;j<=5;j++)
      {
      if(j<i)
      printf(" ");
      else
      printf("%d",j);
      }
      printf("\n");
      }
      }

      Delete
    3. ****5
      ***45
      **345
      *2345
      12345

      main()
      {
      int i,j;
      for(i=5;i>=1;i--)
      {
      for(j=1;j<=5;j++)
      {
      if(j<i)
      printf(" ");
      else
      printf("%d",j);
      }
      printf("\n");
      }
      }

      Delete
  14. i want to print

    c
    co
    com
    comp
    compu
    comput
    compute
    computer

    please tell me the programme to write the above
    thankssssssss

    ReplyDelete
    Replies
    1. #include
      #include
      int main()
      {
      char s[]="computer";
      int i,j;
      for(i=0;s[i];i++)
      {
      for(j=0;j<=i;j++)
      printf("%c",s[j]);
      printf("\n");
      }
      return 0;
      }

      Delete
    2. sir plzz tellme this program using manipulators in c++

      Delete
  15. sir can you give me your phone no. or email ID so that i can contact you directly....

    ReplyDelete
  16. What is the code for ??
    1 2 3 4 4 3 2 1
    1 2 3 3 2 1
    1 2 2 1
    1 1

    ReplyDelete
    Replies
    1. void main()
      {
      int i,j,k;
      for(i=4;i>=1;i--)
      {
      for(j=1;j<=i;j++)
      {
      printf("%d",j);
      }
      for(j=i;j>=1;j--)
      {
      printf("%d",j);
      }
      printf("\n");
      }
      }

      Delete
  17. Replies
    1. printf("1\n");
      for(i=3;i<=4;i++)
      {
      for(j=2;j<=i;j++)
      printf("%d",j);
      for(j=i-1;j>=2;j--)
      printf("%d",j);
      printf("\n");
      }

      Delete
  18. what is program for this?
    *##
    #*#
    ##*
    help!

    ReplyDelete
    Replies
    1. for(i=1;i<=3;i++)
      {
      for(j=1;j<=3;j++)
      {
      if(i==j) printf("*");
      else printf("#");
      }
      printf("\n");
      }

      Delete
  19. how this can be code in c
    1*3*5*7
    2*4*6
    3*11
    8*10
    13
    pls help as soon as possible

    ReplyDelete
  20. Replies
    1. for(i=1;i<=5;i++)
      {
      for(j=1;j<=i;j++)
      {
      if(j%2==0) printf("A");
      else printf("*");
      }
      printf("\n");
      }

      Delete
  21. Please give the solutionof modular program to read n numbers and find divisors of each of them........

    ReplyDelete
  22. what is the programe
    1
    23
    456
    7890
    12345

    ReplyDelete
    Replies
    1. int main()
      {
      int i,j,k;
      k=1;
      for(i=1;i<=5;i++)
      {
      for(j=1;j<=i;j++)
      {
      if(k==10) k=0;
      printf("%d",k++);
      }
      printf("\n");
      }
      }

      Delete
  23. Replies
    1. tweak with http://cbasicprogram.blogspot.in/2012/04/number-pattern-20.html

      in inner loop replace
      printf("%d",j%2);

      with

      if (j%2==0)
      printf("2");
      else
      printf("1");

      Delete
  24. 1 2 3 4 5
    16 6
    15 7
    14 8
    13 12 11 10 9

    ReplyDelete
    Replies
    1. Tweak with this http://cbasicprogram.blogspot.in/2012/05/perfect-square.html

      Delete
  25. Replies
    1. http://cbasicprogram.blogspot.in/2012/04/number-pattern-1.html
      in above program just change printf("%d",j); to printf("%d",j*j);

      Delete
  26. how will we print this
    1234
    14 5
    13 6
    12 7
    111098

    ReplyDelete
    Replies
    1. tweak with http://cbasicprogram.blogspot.in/2012/05/perfect-square.html

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

    Help please!
    TIA!

    ReplyDelete
  28. will you please help me this
    1
    232
    23432
    2345432

    ReplyDelete
    Replies
    1. tweak with http://cbasicprogram.blogspot.in/2012/04/number-pattern-27.html

      Delete
  29. Thank you very much... :)
    u helped me a lot..

    ReplyDelete
  30. 55555
    55555
    45555
    34555
    23455
    12345

    how to make it? plzzzz teach me..... what im going to do is a rectangular, so there will be extra one lane compare to it's base...

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2012/04/number-pattern-18.html
      Print extra line before the loop, or start loop with 6 and if i=6 then print i else rest of the logic

      Delete
  31. 5 5 5 5 5
    5 5
    5 5
    5 5
    5 5 5 5 5
    code for this plz.............

    ReplyDelete
    Replies
    1. use http://cbasicprogram.blogspot.in/2013/01/number-pattern-42.html
      and print 5 instead of 1

      Delete
  32. 1
    3 5
    7 9 11
    13 15 17 19
    21 23 25 27 29

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2012/04/number-pattern-19.html
      just modify it to increment k by 2 instead of 1

      Delete
  33. Replies
    1. http://cbasicprogram.blogspot.in/2012/04/number-pattern-1.html
      change from printf("%d",j);
      to printf("%d",(j*2)-1);

      Delete
  34. plz help me in this

    *****1
    ****12
    ***123
    **1234
    *12345
    123456

    ReplyDelete
    Replies
    1. Just add following loop as first inner loop
      http://cbasicprogram.blogspot.in/2012/04/number-pattern-1.html
      for(j=4;j>=i;j--)
      {
      printf("*");
      }

      Delete
  35. 5
    15 5
    25 15 5
    35 25 15 5


    help me plz

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2012/04/number-pattern-3.html
      just modify printf("%d",j);
      to printf("%d ",(j*10)-5);

      Delete
  36. Its very helpful for me Thanks :)

    ReplyDelete
  37. @nimish
    dude you are awesome ....so helpful blog !!
    keep updating...tc

    ReplyDelete
  38. ya its very usefull for us.......

    ReplyDelete
  39. please write here the solution :

    1
    2 5
    6 9 14
    15 18 23 30
    31 34 39 46 57

    ReplyDelete
    Replies
    1. hit for rows
      1 + 1x1 = 2
      2 + 2x2 = 6
      6 + 3x3 = 15
      15 + 4x4 = 31
      31 + 5x5 = 56

      for columns
      add 3,5,7,9...

      Delete
  40. thanks,this program is very helpful for me.....!!!!!!!

    ReplyDelete
  41. _ _ 1
    _ 2
    3 _ _
    _ 4 _
    _ _ 5

    Sir, Could you Please reply for This Pattern. It would be very helpful sir
    Thank u

    ReplyDelete
    Replies
    1. for(i=1;i<=5;i++)
      {
      for(j=1;j<=3-i;j++)
      printf(" ");
      for(j=4;j<=i;j++)
      printf(" ");
      printf("%d\n",i);
      }

      Delete
  42. please write here the solution :
    1
    3 2
    4 5 6
    10 9 8 7
    11 12 13 14

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2013/01/number-pattern-52.html

      Delete
  43. plss i need this to be done.. wap to generate the foll pattern:
    1
    232
    34543
    4567654
    567898765

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2013/01/number-pattern-53.html

      Delete
  44. plz give the coding of this in c++

    11
    1212
    123123
    12341234

    ReplyDelete
    Replies
    1. simply use inner J loop 2 times of http://cbasicprogram.blogspot.in/2012/04/number-pattern-1.html

      Delete
  45. How to find the sum of following series:-

    (1) + (1+2) + (1+2+3) + (1+2+3+4)....... upto n number of terms

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2013/01/series-program.html

      Delete
  46. How to find the following sum:-

    1/2 - 2/3 + 3/4 -4/5 + 5/6...... upto n number of terms

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2013/01/series-program-9.html

      for Series programs please put your comments on Series Programs Page
      http://cbasicprogram.blogspot.in/2013/01/series-program.html

      Delete
  47. it is very useful for me thanks a lot!!!!!

    ReplyDelete
  48. _ _ _ _ 1_ _ _ _
    _ _ _ 1 2 1_ _ _
    _ _ 1 2 3 2 1_ _
    _ 1 2 3 4 3 2 1_
    1 2 3 4 5 4 3 2 1

    What would be the code for this pattern?
    (Ignore '_'. Used for indenting)

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2013/01/number-pattern-56.html

      Delete
  49. Please give code for:
    ___________1
    ________2_____2
    _____3___________3
    _ 4__________________4
    _____3___________3
    ________2_____2
    ___________1

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2013/01/number-pattern-57.html

      Delete
  50. 1 2 3 4 5
    16 6
    15 7
    14 8
    13 12 11 10 9


    Please tell me how to print above pattern?

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.com/2013/01/number-pattern-58.html

      Delete
  51. WAP to get the sum of series 1+2 pow x+3 pow x+.......+n pow x

    ReplyDelete
  52. Sir Plz upload Linked list concepts and Programs

    ReplyDelete
  53. series of numbers entered by user the program is to check weather the the user entered in series or not

    ReplyDelete
  54. Very Helpful for Freshers.....

    ReplyDelete
  55. can anyone tell me the code to print the following structure

    1
    3 5
    7 9 11

    ReplyDelete
  56. 1,2,3,6,9,18,27,54 how to print this series

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.com/2013/01/series-program-10.html

      Delete
  57. thnxxx a lot @nimish sir.....its very helpful for me....keep updating sir..and give me your email id for contact ... thnkuuu so much

    ReplyDelete
  58. program for:
    1
    1 1
    1 2 1
    1 3 3 1
    1 4 6 4 1

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2013/01/pascal-triangle.html

      Delete
  59. how to display the pattern with a number
    eg:- N=39714

    3 9 1 7 4
    9 1 7 4
    1 7 4
    7 4
    4

    ReplyDelete
  60. This web blogspot is best among all I have ever seen you are doing good job nimish bro I got cleared many doutsdouts thanks.

    ReplyDelete
  61. thanks a lot for this logics . its asome blog for beginers of C

    ReplyDelete
  62. This is one of the vast collections of pattern programming in C!
    Thanks for your work!

    ReplyDelete
  63. thanks a lot for logics ....this blog is very helpful

    ReplyDelete
  64. thank you for the information, this is very useful

    ReplyDelete
  65. WAP to calculate the sum of a given no. 123=1 2 3=6.. Help me in solving this program

    ReplyDelete
  66. Hey you are doing great job .! kudos to you .
    can I have your Email id so that i can resolve my stuff on mail

    ReplyDelete
  67. Really helpful...thank you so much.....

    ReplyDelete
  68. is there is any simple logic for pattern programs

    ReplyDelete
  69. Hi Sir I Want To Learning Functions OOP In C++ ;

    ReplyDelete
  70. how have you developed good coding skills? can you reply?

    ReplyDelete
  71. Sir can u tell me how to understand a number pattern program

    ReplyDelete
  72. Sir thanks for ur solutions can u please write the code for below pattern
    1
    2 9
    3 8 10
    4 7 11 14
    5 6 12 13 15

    ReplyDelete
  73. hi sir i want coding for this one please help me well the question is printing the matrix in spiral form .
    1 2 3
    4 5 6
    7 8 9
    and the output is 4 5 7 8 9 6 3 2 1

    ReplyDelete

  74. hi sir i want coding for
    1
    12
    123
    1234
    12345

    ReplyDelete
  75. hi sir i want coding for
    1
    12
    123
    1234
    12345

    ReplyDelete
    Replies
    1. class pattern
      {
      public static void main(String args[])
      {
      int i,j,n;
      Scanner sc=new Scanner(System.in);
      System.out.println("enter the no:);
      n=sc.nextInt();
      for(i=0;i<n;i++)
      {
      for(j=0;j<i;j++)
      {
      System.out.printin(j+" ");
      }
      system.out.prin();
      }
      }

      Delete
  76. pls answer for this pattern
    n=5;
    15 10 6 3 1
    14 9 5 2
    13 8 4
    12 7
    11
    pls answer for this solution

    ReplyDelete
  77. HELLO SIR CAN YOU PLEASE SEND ME THE CODE FOR:
    1
    2 9
    3 8 10
    4 7 11 14
    5 6 12 13 15

    ReplyDelete
  78. HELLO SIR CAN YOU PLEASE SEND ME THE CODE FOR:
    1
    2 9
    3 8 10
    4 7 11 14
    5 6 12 13 15

    ReplyDelete
    Replies
    1. sir, what about this pattern? what's the logic of it?

      Delete
  79. sir please help me..
    input=6
    0utput=
    1 2 3 4 5 6
    13 14 15 16 17 18
    25 26 27 28 29 30
    31 32 33 34 35 36
    19 20 21 22 23 24
    7 8 9 10 11 12

    ReplyDelete
  80. sir please help me..
    input=6
    0utput=
    1 2 3 4 5 6
    13 14 15 16 17 18
    25 26 27 28 29 30
    31 32 33 34 35 36
    19 20 21 22 23 24
    7 8 9 10 11 12

    ReplyDelete
  81. can any one tell how to print this sequence
    1
    12
    123
    1234
    12345

    ReplyDelete
  82. ----5
    ---454
    --34543
    -2345432
    123454321

    where - is a space

    ReplyDelete
  83. Create A Flowchart That Will Print The Number From High To Low And Vice Versa.
    Sample Output: 5
    55555
    4444
    333
    22
    1
    1
    22
    333
    4444
    55555

    ReplyDelete
  84. Check out this for pattern printing in C https://www.programmingponds.com/2018/08/program-in-c-to-print-different-types.html

    ReplyDelete
  85. #include
    int main()
    {
    int i, j;
    int n=6;
    for(i=n;i>=1;i--)
    {
    for(j=1;j<=i;j++)
    {
    printf("%d",i);
    }
    printf("\n");
    }
    for(i=1;i<=n;i++)
    {
    for(j=1;j<=i;j++)
    {
    printf("%d",i);
    }
    printf("\n");
    }
    return 0;
    }

    ReplyDelete
  86. I need code of this
    333
    414
    525
    636
    333

    ReplyDelete
  87. 1=1
    1+2=3
    1+2+3=6
    1+2+3+4=10
    1+2+3+4+5=15
    can anyone tell code for this

    ReplyDelete
  88. for n=4
    1 2 3 4
    9 10 11 12
    13 14 15 16
    5 6 7 8
    please give the short and effective logic for this

    ReplyDelete
  89. Code for above output

    1*2*3*10*11*12
    4*5*8*9
    6*7

    ReplyDelete
  90. pattern :
    1
    2 4
    3 5 7
    6 8
    9
    please someone explain logic for the above pattern.

    ReplyDelete
  91. Can I have code for below pattern
    1
    2*3
    4*5*6
    7*8*9*10
    7*8*9*10
    4*5*6
    2*3
    1

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. #include
      #include
      int main()
      {
      int n,i,temp,j,k=1,l,m;
      scanf("%d",&n);

      for(i=1 ; i<=n; i++)
      {
      for(j=1 ; j<=i ; j++)
      {
      printf("%d ",k);
      k++;
      if(i!=j)
      printf("*");

      }
      printf("\n");
      }
      k-= n;
      temp=k;
      for(i=n ; i>=1; i--)
      {
      for(j=1 ; j<=i ; j++)
      {
      printf("%d ",temp);
      temp++;
      if(i!=j)
      printf("*");
      }
      printf("\n");
      k-= (i-1);
      temp=k;

      }
      }

      Delete

  92. 1
    2*3
    4*5*6
    7*8*9*10
    7*8*9*10
    4*5*6
    2*3
    1
    #include
    void print(int n)
    {
    for(int i = 1; i <= n; i++)
    {
    for(int j = 1; j < i+1; j++)
    {
    if(j < i)
    {
    printf("%d*",i);

    }
    else
    {
    printf("%d ",i);
    }
    }
    printf("\n");
    }
    for(int i = n; i >= 1; i--)
    {
    for(int j = 1; j < i+1; j++)
    {
    if(j < i)
    {
    printf("%d*",i);

    }

    else
    {
    printf("%d ",i);
    }
    }
    printf("\n");
    }
    }
    int main()
    {
    int n;
    scanf("%d",&n);
    print(n);
    return 0;
    }

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

    Please solve this and explain the logic.

    ReplyDelete
  94. 3
    123
    234
    345

    #include

    int main() {
    //code
    int i,j,n,k,t=0;
    scanf("%d",&n);

    for(i=1;i<=n;i++)
    {
    t++;
    k=t;
    for(j=1;j<=n;j++)
    {
    printf("%d",k);
    k++;
    }
    printf("\n");
    }
    return 0;
    }

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

    ReplyDelete
  96. how to print
    1
    141
    14941

    ReplyDelete
  97. how to print 0
    12
    345
    6789
    Using two variables I,j only
    .

    ReplyDelete
  98. how to print
    1 2 3 4
    9 10 11 12
    13 14 15 16
    5 6 7 8

    ReplyDelete
    Replies
    1. 4
      1 2 3 4
      9 10 11 12
      13 14 15 16
      5 6 7 8
      CODE:
      #include
      void print(int n)
      {
      int i,j;
      int k=1;
      int m[n][n];
      for(i = 0; i < n; i++)
      {
      for(j = 0; j < n;j++)
      {
      m[i][j] = k++;
      }
      }
      for(i = 0; i < n; i++)
      {
      for(j = 0; j < n;j++)
      {
      if(i%2 == 0)
      {
      printf("%d ",m[i][j]);
      }
      }
      printf("\n");
      }
      for(i = n-1;i >= 0;i--)
      {
      for(j = 0; j < n; j++)

      {
      if(i%2 != 0)
      printf("%d ",m[i][j]);
      }
      printf("\n");
      }
      }
      int main()
      {
      int n;
      scanf("%d",&n);
      print(n);
      return 0;
      }

      Delete
  99. 1 2 3 4
    9 10 11 12
    13 14 15 16
    5 6 7 8

    void print(int n)
    {
    int i,j;
    int k=1;
    int m[n][n];
    for(i = 0; i < n; i++)
    {
    for(j = 0; j < n;j++)
    {
    m[i][j] = k++;
    }
    }
    for(i = 0; i < n; i++)
    {
    for(j = 0; j < n;j++)
    {
    if(i%2 == 0)
    {
    printf("%d ",m[i][j]);
    }
    }
    printf("\n");
    }
    for(i = n-1;i >= 0;i--)
    {
    for(j = 0; j < n; j++)

    {
    if(i%2 != 0)
    printf("%d ",m[i][j]);
    }
    printf("\n");
    }
    }
    int main()
    {
    int n;
    scanf("%d",&n);
    print(n);
    return 0;
    }

    ReplyDelete
  100. Hello Friends,
    How to write a code for this program? Please help me...

    1
    2 15 3
    4 5 66 6 7
    8 9 10 189 11 12 13
    .
    .

    ReplyDelete
  101. bro i need this pattern
    1
    2 4
    1 3 5
    2 4 6 8
    1 3 5 7 9
    2 4 6 8 10

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

    ReplyDelete
  103. I/P:
    6
    O/P:
    1
    2 4
    1 3 5
    2 4 6 8
    1 3 5 7 9
    2 4 6 8 10 12
    CODE:
    #include

    int main() {
    int n,i,j,k1,k2;
    scanf("%d",&n);

    for(i=0;i<=n;i++)
    {
    if(i%2!=0)
    {
    k1=1;
    for(j=0;j<i;j++)
    {
    printf("%d ",k1);
    k1+=2;;
    }
    }
    else
    {
    k2=2;
    for(j=0;j<i;j++)
    {
    printf("%d ",k2);
    k2+=2;
    }
    }
    printf("\n");
    }
    return 0;
    }

    ReplyDelete
  104. Code for
    1×2××4×17×18×19×20
    --5×6×7×14×15×16
    ---8×9×12×13
    ----10×11

    ReplyDelete
  105. Pattern

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

    ReplyDelete
  106. Please Help--

    Input : n = 4
    Output :
    1
    3*2
    4*5*6
    10*9*8*7

    ReplyDelete
    Replies
    1. int main()
      {
      int i,j,n,count=0,k=0;
      printf("Enter N\n");
      scanf("%d",&n);
      for(i=1;i<=n;i++)
      {
      count=k;
      for(j=1;j<=i;j++)
      {
      if(i%2==0)
      {
      printf("%d",count+i);
      count=count-1;
      if(j!=i)
      printf("*");
      k++;
      }
      else
      {
      count=count+1;
      printf("%d",count);
      if(j!=i)
      printf("*");
      k++;
      }
      }
      printf("\n");
      }
      return 0;
      }

      Delete
  107. Write a program for the pattern
    3
    5 5
    7 7 7
    9 9 9 9
    11 11 11 11 11

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

    ReplyDelete
  109. 1
    1 1
    1 2 1
    1 3 3 1
    1 4 6 4 1
    1 5 10 10 5 1

    ReplyDelete
  110. 12345 67890
    1 5 6 0
    12345 67890
    1 678
    1 6 9

    how to print this

    ReplyDelete
  111. 1*2*3*4*17*18*19*20
    5*6*7*14*15*16
    8*9*12*13
    10*11

    ReplyDelete









  112. 1
    1 2 1
    1 2 3 2 1
    1 2 3 4 3 2 1
    1 2 3 4 5 4 3 2 1

    Anyone do this program please
    Early

    ReplyDelete
  113. 1 1
    12 21
    123 321
    1234321

    please solve this .

    ReplyDelete
  114. 1
    1 1
    1 2 1
    1 3 3 1
    1 4 6 4 1
    1 5 10 10 5 1

    ReplyDelete
  115. i need code for this pattern
    input:
    1*2*3*4*5
    11*12*13*14*15
    21*22*23*24*25
    16*17*18*19*20
    6*7*8*9*10

    this is top and bottom alternate pattern program.

    ReplyDelete
  116. Could you help me with this pattern?
    9
    579
    13579
    1357913

    ReplyDelete
  117. Could any one help me in butterfly pattern?

    ReplyDelete
  118. If n= 12
    1 2
    1 3 2
    1 4 3 5 2
    1 5 4 7 3 8 5 7 2

    ReplyDelete
  119. Can anyone tell how to print the following pattern?

    0
    10 12
    20 22 24
    30 32 34 36

    ReplyDelete
  120. print in c pg

    12345
    54321
    12345
    54321
    12345
    54321

    ReplyDelete
  121. 1
    3 1
    5 3 1
    7 5 3 1
    9 7 5 3 1
    Hw to print plz

    ReplyDelete
  122. 1 2 3 4 5
    2 2 3 4 5
    3 3 3 4 5
    4 4 4 4 5
    5 5 5 5 5
    Hw to print plz

    ReplyDelete
  123. Sir please send the code for this pattern
    1
    2 9
    3 8 10
    4 7 11 14
    5 6 12 13 15

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

    ReplyDelete