Skip to content

Instantly share code, notes, and snippets.

@cagataycali
Created October 3, 2015 13:59
Show Gist options
  • Select an option

  • Save cagataycali/a88c6a896b017e5e34e4 to your computer and use it in GitHub Desktop.

Select an option

Save cagataycali/a88c6a896b017e5e34e4 to your computer and use it in GitHub Desktop.
C dilinde , '*'ler yardimiyla eskenar dortgen cizen program
/* '*'ler yardimiyla eskenar dortgen cizer */
#include<stdio.h>
int main( void )
{
int i, j;
for(i = 1; i <= 5; i++) {
for(j = 1; j <= 9; j++)
if((j <= (9 - (2*i - 1))/2) || (j > (i + 4)))
printf(" ");
else
printf("*");
printf("\n");
}
for(i = 4; i >= 1; i--){
for(j = 1; j <= 9; j++)
if((j <= (9 - (2*i - 1))/2) || (j > (i + 4)))
printf(" ");
else
printf("*");
printf("\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment