Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void main()
- {
- int row, col, c;
- printf("This is a simple program to print a rectangle star pattern using while loop.\n\n");
- printf("Enter number of rows : ");
- scanf("%d", &row);
- printf("Enter number of columns : ");
- scanf("%d", &col);
- c = col;
- while(row > 0)
- {
- col = c;
- while(col > 0)
- {
- printf("*");
- col--;
- }
- printf("\n");
- row--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement