Explore
ProGrad Programs
Placement Prep
TCS Codevita
Live Placement Training
Webinars
About Us

Edit
Reply




Edit

Program to print solid and hollow rectangle star pattern | FACE Prep

Published on 11 Mar 2020

Program to print solid and hollow rectangle star pattern is discussed here. Given the number of rows and columns, print the solid and hollow rectangle star patterns.


Solid rectangular star pattern:


Number of rows: 3

Number of columns: 5


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


Program to print solid rectangular star pattern


C
C++
Java
Python 3

Output
Input -
Enter the number of rows : 3
Enter the number of columns : 6
Output -
* * * * * *
* * * * * *
* * * * * *


Hollow rectangular star pattern:


Number of rows: 3

Number of columns: 5


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


Program to print hollow rectangle star pattern


C
C++
Java
Python 3

Output
Input -
Enter the number of rows : 4
Enter the number of columns : 6
Output -
* * * * * *
*         *
*         *
* * * * * *


Recommended Programs






If you have any feedback about this article and want to improve this, please write to enquiry@faceprep.in