Example of gotoxy()
/* Program to Create a Dancing & Walking boy*/
#include<iostream.h>
#include<conio.h>
#include<dos.h>
void main()
{
int i,j,k;
for(i=10;i<75;i++)
{
clrscr();
gotoxy(i,15);
cprintf("\1");
gotoxy(i,16);
cprintf("|/'");
gotoxy(i,17);
cprintf("_/|_ ");
delay(190);
clrscr();
gotoxy(i,15);
cprintf("\1");
gotoxy(i,16);
cprintf("\'\\|");
gotoxy(i,17);
cprintf("_|\\_ ");
delay(190);
}
gotoxy(40,16);
cprintf("Let's ROcK!!");
getch();
}
/* Program to Create a Dancing & Walking boy*/
#include<iostream.h>
#include<conio.h>
#include<dos.h>
void main()
{
int i,j,k;
for(i=10;i<75;i++)
{
clrscr();
gotoxy(i,15);
cprintf("\1");
gotoxy(i,16);
cprintf("|/'");
gotoxy(i,17);
cprintf("_/|_ ");
delay(190);
clrscr();
gotoxy(i,15);
cprintf("\1");
gotoxy(i,16);
cprintf("\'\\|");
gotoxy(i,17);
cprintf("_|\\_ ");
delay(190);
}
gotoxy(40,16);
cprintf("Let's ROcK!!");
getch();
}
No comments:
Post a Comment