Skip to content

added dynamic star pattern printing program #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Contributor.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This is a repo created to remember the Hacktober Fest organized by Github, Digit
- [Ema Fazillah](https://github.com/emafazillah) | [No school](https://twitter.com/hashtag/noschool?lang=en)
- [Shubham Verma](https://github.com/shubhamvrm) | [Jamia Millia Islamia](https://www.jmi.ac.in)
- [Abhinav Akhil](https://github.com/abhinavakhil)
- [Joydeep Paul] (https://github.com/jdpaul25)

_Please follow the github Markdown format strictly else PR request might get neglected._
_Change the demo details and enter your details there, make sure to leave a demo markdown code there for other as it was before._
Expand Down
30 changes: 30 additions & 0 deletions dynamic_programming/STAR25.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* print this pattern:
*****
* ***
** **
*** *
*****
*/
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,j;
clrscr();
printf("enter the no. of layers:");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
if(i==1||i==n)
printf("*");
else if (i==j)
printf(" ");
else
printf("*");
}
printf("\n");
}
getch();
}