//Downloaded From theonlinetutorials.com
#include"stdio.h"
#include<conio.h>
void main()
{
int a;
int i,j,k;
clrscr();
printf(" Enter an integer value: ");
scanf("%d",&a);
for(i=0;i<=2*a+1;i++)
printf("*");
printf("\n");
for(i=1;i<=a-1;i++)
{
for(j=a;j>=i;j--)
printf("*");
printf(" ");
for(j=a;j>=i;j--)
printf("*");
printf("\n");
}
printf("*Theonlinetutorials.com \n");
for(i=2;i<=a;i++)
{
for(j=1;j<=i;j++)
printf("*");
printf(" ");
for(j=1;j<=i;j++)
printf("*");
printf("\n");
}
for(i=0;i<=2*a+1;i++)
printf("*");
getch();
}
Not Satisfied ? Just search & get the result
Related posts:
- C Program – Print the number which are not occurred in Fibonacci Series
- C program to generate and print prime numbers in a given range. Also print the number of prime numbers
- C program to generate and print first N FIBONACCI numbers
- C Program – Implement the midpoint circle drawing algorithm
- C program to find the value of sin(x) using the series up to the given accuracy (without using user defined function) Also print sin(x) using library function.
