Mephistophelés
Bronz Üye
-
- Katılım
- Eylül 10, 2012
-
- Mesajlar
- 3,744
-
- Tepkime puanı
- 2
-
- Puanları
- 293
-
- Yaş
- 48
Kod:
#include <stdio.h>
#include <windows.h>
#include <conio.h> //getch() icin
**** gotoxy(short x, short y)
{
HANDLE hConsoleOutput;
COORD Cursor_Pos = {x-1, y-1};
hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hConsoleOutput, Cursor_Pos);
}
int main()
{
int y=1;
int dy=1;
do{
gotoxy(40, y);dy>0?printf("V"):printf("A");
Sleep(50);
gotoxy(40, y);printf(" ");
y += dy;
if(y>23||y<2)
dy = -dy;
}while(!kbhit());
}