计时器3.0

#include 
#include
using namespace std;
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
int x,f,m,h;
int main();
void mb(){
	int xs=0,fz=0,ms=0,hs=0;
	while(!KEY_DOWN(MOUSE_EVENT)){
		if(hs==10){
			ms++;
			hs=0;
		}else if(ms==60){
			fz++;
			ms=0;
		}else if(fz==60){
			xs++;
			fz=0;
		}
		cout<<"============"<>xs>>fz>>ms;
	while((xs!=0||fz!=0||ms!=0)&&!KEY_DOWN(MOUSE_EVENT)){
		if(ms==-1){
			fz--;
			ms=59;
		}else if(fz==-1){
			xs--;
			fz=59;
		}
		cout<<"=========="<>js; 
	if(js==1){
		mb();
	}else if(js==2){
		jsq();
	}else if(js==3){
		exit(0);
	}
	system("cls");
	main(); 
    return 0;
}

1.美化了页面

运行效果

屏幕录制 2023-09-10 062553

你可能感兴趣的:(c++,算法,开发语言,游戏)