How to create the star rectangle map
--------------------------------------------------Program-----------------------------------------------------
--------------------------------------------------Output-------------------------------------------------------
#include<stdio.h> #include<conio.h> main() { int i,j,n; printf("Enter number of stars: "); scanf("%d",&n); for(i=1;i<=n;i++){ for(j=1;j<=n;j++) printf("%c",15); printf("\n"); } getch(); }
--------------------------------------------------Output-------------------------------------------------------
Screenshot for above pyramid |
No comments