Friday, July 12, 2013

C program (WELCOM)

write a program to scroll welcome on ur screen from one end to another end



#include<stdio.h>
#include<conio.h>
#include<dos.h>
  void main()
   {
   int x,y,i;
      x=20;
      y=10;
    while(!kbhit())
    {
    gotoxy(x,y);
    delay(200);
    printf("WELCOME");
    gotoxy(x,y);
    for(i=1;i<=7;i++)
       {
       printf(" ");
       }
       if(x<50)
       x=x+1;
       if(x==50)
       x==20;
       getch();
     }
      }