Here's an idea which can be improved with some effort:
Code:
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <time.h>
void delay(long s)
{
clock_t end = clock()+(clock_t)s;
while (clock() < end);
}
int main( void )
{
char fullname[1000];
int i, j=0;
int y = 1, x = 80;
printf("Please Enter your fullname: ");
fgets( fullname, sizeof( fullname ), stdin );
clrscr();
fullname[ strlen( fullname)-1 ] = '\0';
while(1){
for(i=0; i<80; i++){
gotoxy(i, y);
if( fullname[j] == '\0' ){
printf( " " );
j=0;
}
else {
printf("%c", fullname[j] );
j++;
delay( 100 );
}
}
j = 0;
for(i=0; i<=25; i++){
gotoxy( x, i );
if( fullname[j] == '\0' ){
printf( " " );
j=0;
}
else {
printf("%c", fullname[j] );
j++;
}
delay( 100 );
}
if( y == 80 && x == 1 )
break;
y = 80;
x = 1;
}
return 0;
}
WARNING: If your screen isn't 80 x 25 this will be very ugly!