啊哈磊_编程从这里起步
标题:
新人求助。。
[打印本页]
作者:
Remorse.灵
时间:
2019-4-14 19:32
标题:
新人求助。。
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
int gotoxy(int x,int y)
{
COORD c;
c.X=x-1;
c.Y=y-1;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),c);
}
int main()
{
struct point
{
int x,y;
int xv,yv;
}man;
long p;
man.X = man.Y=20;
man.XV = man.YV=1;
system("cls");
p=1000000000000000;
while (p--)
{
if (p%50000)
continue;
gotoxy(man.X,man.Y);
printf(" ");
man.X += man.XV;
man.Y += man.YV;
if (man.X==0|man.X==80)
man.YV*=-1;
if (man.Y==0|man.Y==80)
man.YV*=-1;
gotoxy(man.X,man.Y);
printf("%c",2);
}
getchar();
return 0;
}
复制代码
[qq]3520055096[/qq]
作者:
Jesse1
时间:
2019-8-5 18:53
这是新人?连WINDOWS都用上了,开玩笑吧
欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/)
Powered by Discuz! X3.2