Skip to content

Instantly share code, notes, and snippets.

@Mashpy
Last active December 10, 2015 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mashpy/4358172 to your computer and use it in GitHub Desktop.
Save Mashpy/4358172 to your computer and use it in GitHub Desktop.
Print Y with Star *
#include<stdio.h>
int main()
{
int i,j,n=8;
for(i=1;i<=n;i++)
{
for(j=1;j<=(n+n);j++)
{
if(j==i||j==(n+n)-i)
printf("*");
else
printf(" ");
}
printf("\n");
}
for(i=1;i<=n;i++){
printf(" *\n");}
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment