{"id":10888,"date":"2021-09-30T15:00:08","date_gmt":"2021-09-30T09:30:08","guid":{"rendered":"https:\/\/python-programs.com\/?p=10888"},"modified":"2021-11-22T18:34:30","modified_gmt":"2021-11-22T13:04:30","slug":"python-program-to-print-hollow-rectangle-star-pattern","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-print-hollow-rectangle-star-pattern\/","title":{"rendered":"Python Program to Print Hollow Rectangle Star Pattern"},"content":{"rendered":"

Guys who are serious about learning the concepts of the java programming language should practice this list of programs in java<\/a> and get a good grip on it for better results in exams or interviews.<\/p>\n

Given the length, breadth of the rectangle the task is to print the hollow rectangle star pattern in C, C++, and Python.<\/p>\n

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

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

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

given length of rectangle =11\r\ngiven breadth of rectangle =19<\/pre>\n

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

* * * * * * * * * * * * * * * * * * * \r\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 length of rectangle =20\r\ngiven breadth of rectangle =5<\/pre>\n

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

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

\u00a0<\/strong><\/p>\n

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

Below are the ways to print the Hollow Rectangle star pattern in C, C++, and Python.<\/p>\n