⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bomber3.c

📁 C.Game.Programming.For.Dummies原码
💻 C
字号:
#include <stdio.h>
#include <conio.h>
#include <dos.h>

void dropBomb(void);	//The devious prototype

int killed;		//A global variable

void main()
{
	char x;

	killed=0;

	while(x!='~')
	{
		printf("Press ~ to end your mission\n");
		printf("Press any key to drop bomb:");
		x=getch();
		dropBomb();
		printf("\n%i people killed!\n",killed);
	}
}

void dropBomb()
{
	int x;

	for(x=880;x>440;x-=10)
	{
		sound(x);
		delay(100);
	}
	nosound();
	killed+=15;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -