数字炸弹
使用的是C语言
# 内容
#include<stdio.h>
#include<stdlib.h>
int main(){
//变量
char c_TheRequest = 1;//开始界面的字符
int in_Deltar = 1,in_EnteredNumber,in_Sig;//游戏中输入数字及其判定所需要的数字
int in_GivenNum = 0,in_An = 0,in_Bn = 0;//出的数字,和数字区间
int in_Mid1,in_Mid2;//用来交换An、Bn的值以满足An<Bn的中间量
int in_DistantAn,in_DistantBn;//An与Bn离num的距离
int in_TemporaryAnSaver,in_TemporaryBnSaver;//临时用于比较的An、Bn储存器
//开始界面
printf("If you just happen to open the game and do not have the intention to play it.\n");
printf("You can enter a q to quit or you can enter an s to start the game now!\n");
scanf("%c",&c_TheRequest);
getchar();
while (c_TheRequest != 's' && c_TheRequest != 'q'){
printf("Please do not enter a irrelevant letter.\n");
scanf("%c",&c_TheRequest);
getchar();
}
if(c_TheRequest == 'q'){
printf("So sad then.Hope you can play with me next time.\n");
getchar();
}
//游戏
if(c_TheRequest == 's'){
//输入“数字炸弹”
system("cls");
printf("(^ o ^) # *** NOW LET\'S PLAY! *** # (^ o ^)\nAttention!You can only enter numbers in the following steps.\nEnter to start.\n");
getchar();