Tuesday, September 13, 2011

C Program for Rain Drop of String

#include<stdio.h>
#include<dos.h>
#include<conio.h>
#include<string.h>

void main()
{
char nam[10];
int i,n,j=4,k,l=10;

clrscr();
//gotoxy(10,4);
gets(nam);
n=strlen(nam);
for(i=0;i<n;i++)
{
 gotoxy(j,l);
 for(k=0;k<10;k++)
 {printf("\b");
  printf("%c",nam[i]);
  delay(500);
  printf("\b");
  if(k!=9)
  {
    printf(" ");
  }
    gotoxy(j,l);
      l=l+2;
       }
     l=10;   j=j+4;
     } getch();
     }

No comments:

Post a Comment