{"id":11111,"date":"2021-09-30T15:00:27","date_gmt":"2021-09-30T09:30:27","guid":{"rendered":"https:\/\/python-programs.com\/?p=11111"},"modified":"2021-11-22T18:34:28","modified_gmt":"2021-11-22T13:04:28","slug":"python-program-to-print-hollow-square-star-with-diagonals","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-print-hollow-square-star-with-diagonals\/","title":{"rendered":"Python Program to Print Hollow Square Star With Diagonals"},"content":{"rendered":"

Beginners and experienced programmers can rely on these Best Java Programs Examples<\/a> and code various basic and complex logics in the Java programming language with ease.<\/p>\n

Given the sides of the square, the task is to print the hollow Square star pattern with diagonals in C, C++, and Python.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

given number of sides of square =10<\/pre>\n

Output:<\/strong><\/p>\n

* * * * * * * * * * \r\n* *                * * \r\n*   *            *   * \r\n*     *        *     * \r\n*       *   *        * \r\n*       *   *        * \r\n*     *       *      * \r\n*   *           *    * \r\n* *                * * \r\n* * * * * * * * * *<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

given number of sides of square =10\r\ngiven character to print =$<\/pre>\n

Output:<\/strong><\/p>\n

$ $ $ $ $ $ $ $ $ $ \r\n$ $                   $ $ \r\n$   $               $   $ \r\n$       $        $      $ \r\n$          $   $        $ \r\n$           $ $         $ \r\n$           $   $       $ \r\n$       $          $    $ \r\n$   $                $  $ \r\n$ $ $ $ $ $ $ $ $ $<\/pre>\n

Program to Print Hollow Square Star Pattern with Diagonals in C, C++, and Python<\/h2>\n

Below are the ways to print the hollow square star with Diagonals pattern in C, C++, and Python.<\/p>\n