"X" Animation in C language

How to make a "X" animation in C language

Hello friend in this video i will show you how to make a "X" animation in C language.




If you want to see more amazing graphical video then visit my Youtube chanel, subscribe and support me.

click here for visit my youtube chaanel  



/*Source Code*/ 

#include<stdio.h>

#include<conio.h>

#include<dos.h>

int pat(int);

int colo();

void main()

{

int i,n,k;

clrscr();

printf("E:");

scanf("%d",&n);


for(k=1;k<=17;k++)

{

for(i=1;i<=1;i++)

{

pat(n);

}

delay(200);

clrscr();


for(i=1;i<=k;i++)

{

printf("\n");

}

delay(15);

}

getch();

}



int pat(int n)

{

int i,j,k,l;


for(i=0;i<n;i++)

{

for(k=1;k<=n;k++)

{

for(j=0;j<n;j++)

{

if(i==j || i+j==n-1)

{

textcolor(RED);

cprintf("*");

}

else

cprintf(" ");

}

}

printf("\n");

}

printf("\n");

return ' ';

}

Comments