傻子無聊系列&c++備份:亂竄的小人
#include<bits/stdc++.h>
#include<Windows.h>
using namespace std;
void gotoxy(int x,int y)
{
int xx=0x0b;
HANDLE hOutput;
COORD loc;
loc.X=x;
loc.Y=y;
hOutput=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hOutput,loc);
}
int main()
{
srand((unsigned)time(NULL));
int a,b,c,d,e,f;
while(1)
{
system("cls");
gotoxy(rand()%110,rand()%30);
printf("人");
Sleep(250);
}
return 0;
}
標簽: