Read in your tongue here..

Tuesday, February 4, 2014

Falling String Character wise

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<dos.h>
#include<iomanip.h>
void main()
{
    int i,j,l,t=1;
    char* word;
    cout<<"Enter string: ";
    gets(word);
    l=strlen(word);
    for(i=0;i<l;i++,t++)
    {
        for(j=2;j<=24;j++)
        {
            clrscr();
            cout<<word+i;
            clrscr();
            cout<<setw(l)<<word+i+1;
            gotoxy(t,j);
            cout<<word[i];
            delay(100);
        }
    }
    getch();
    clrscr();
}

No comments:

Post a Comment