Skip to main content

Posts

0-1 Pattern

  /* @ToDo  0-1 Pattern     1     0   1     0   1   0     1   0   1   0     1   0   1   0   1 */ #include   <iostream> using   namespace   std ; int   main (){       #ifndef  ONLINE_JUDGE          freopen ( "../asset/input.txt" , "r" , stdin );          freopen ( "../asset/output.txt" , "w" , stdout );     #endif     // Code here!!      int   n ;  cin >> n ;      int   sign  =  1 ;      for ( int   i = 1 ; i <= n ; i ++){    ...

Inverted Pattern

  /* @ToDo  Inverted Pattern 1   2   3   4   5    1   2   3   4    1   2   3    1   2    1    */ #include   <iostream> using   namespace   std ; int   main (){       #ifndef  ONLINE_JUDGE          freopen ( "../asset/input.txt" , "r" , stdin );          freopen ( "../asset/output.txt" , "w" , stdout );     #endif     // Code here!!      int   n ;  cin >> n ;      for ( int   i = 0 ; i < n ; i ++){          for ( int   j = 1 ; j <= n - i ; j ++)  ...

Butterfly Pattern

  /* @ToDo  Butterfly Pattern     *                                   *     *   *                           *   *     *   *   *                   *   *   *     *   *   *   *           *   *   *   *     *   *   *...

Floyd's Triangle

/*  To Print Floyd's Triangle 1    2   3    4   5   6    7   8   9   10   11  12  13  14  15   */ #include   <iostream> using   namespace   std ; int   main (){       #ifndef  ONLINE_JUDGE          freopen ( "../asset/input.txt" , "r" , stdin );          freopen ( "../asset/output.txt" , "w" , stdout );     #endif     // Code here!!      int   n ;  cin >> n ;      int   count  =  1 ;      for ( int   i = 0 ; i < n ; i ++){          for ( int   j = 0 ; ...

Pyramid

/*  To Print  1    2   2    3   3   3    4   4   4   4    5   5   5   5   5    */ #include   <iostream> using   namespace   std ; int   main (){       #ifndef  ONLINE_JUDGE          freopen ( "../asset/input.txt" , "r" , stdin );          freopen ( "../asset/output.txt" , "w" , stdout );     #endif     // Code here!!      int   n ;  cin >> n ;      for ( int   i = 1 ; i <= n ; i ++){          for ( int   j = 1 ; j <=  i ; j ++){     ...

Pattern

  /* To print Pattern:                     *                 *   *             *   *   *         *   *   *   *     *   *   *   *   * */ #include   <iostream> using   namespace   std ; int   main (){       #ifndef  ONLINE_JUDGE          freopen ( "../asset/input.txt" , "r" , stdin );          freopen ( "../asset/output.txt" , "w" , stdout );     #endif     //...

Pattern

/* To print:                 *                *   *            *   *   *        *   *   *   *    *   *   *   *   *    */ #include   <iostream> using   namespace   std ; int   main (){       #ifndef  ONLINE_JUDGE          freopen ( "../asset/input.txt" , "r" , stdin );          freopen ( "../asset/output.txt" , "w" , stdout );     #endif     // Code here!!      in...

Subscribe to Get's Answer by Email