c程序猜数字游戏源代码

来源:百度知道 编辑:UC知道 时间:2024/09/28 17:20:50
由C语言编写,在100行以上

别的语言行不?老夫会VFP和delphi,就是不会C语言。

我们刚刚课程设计结束,我刚用过,已经过了,用TC2.0运行

#include <stdio.h>
#include <dos.h>

void main()
{
int z,z1,ia,ib,life,easy,xianshi;/*定义变量*/
int i1[4],i2[4];
char yesno;
int a[8],b[8],x,y,i,j,c;

clrscr();/*清屏*/

chooes:/*设置GOTO点*/
printf("Please chooes which level you like:\n 1 for Easy\n 2 for Hard\n Please input 1 or 2 :");/*选择难度开始*/
scanf("%d",&easy);

if(easy==1)
life=15;
else
{
if(easy==2)
life=8;
else
if(easy==416)
{
shua();/*调用刷小屏函数*/
printf("Wahahahaaaaa.......\n You choose -=Crazy=- model!!!\n");
life=5;
getch();
}
else
{
shua();/*调用刷小屏函数*/
printf("**Error...\n Please