Hey, check out this project...
Hey, check out this project!!((note: NOT for windows compilers use)) Copy paste this code. Before you compile and run, post a reply what you think will happen:
#include <iostream.h>
#include <conio.h>
#include <stdlib.h>
int main()
{
int x = 15;
int y = 10;
int a = 1;
while(a==1)
{
char cl = getch();
if (cl==80)
{
clrscr();
gotoxy(x, y);
y++;
putch('@');
gotoxy(x, y++);
}
if (cl==77)
{
clrscr();
gotoxy(x, y);
y++;
putch('@');
gotoxy(x++, y--);
}
if (cl==72)
{
clrscr();
gotoxy(x, y--);
y++;
putch('@');
gotoxy(x, y--);
}
if (cl==75)
{
clrscr();
gotoxy(x--, y);
putch('@');
gotoxy(x--, y);
}
if (cl==27)
{
exit(0);
}
}
return 0;
}
It's a small code, but its mine
PS: im a begginer so don't get mad:rolleyes: