📄 bomber3.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 + -