Move to String in C programming.
#inclide<stdio.h>
#include<conio.h>
void main()
{
int x=30,y=10;
char ch;
gotoxy(x,y);
printf("lucky");
while(1)
{
ch=getch();
switch(ch)
{
case 'a':
x--;
break;
case 's':
x++;
break;
case 'w':
x--;
break;
case 'z':
x++;
break;
case '27':
exit(1);
}
system("cls");
gotoxy(x,y);
printf("lucky");
}
}
0 Comments