忙啦半天不知道如何错啦,求帮忙
#include<stdio.h> //18:26#include<stdlib.h>
#include<string.h>
#include<time.h>
#define jj 81
char *answer[jj];
char *question[jj];
int a=1,b,c,num[3];
void input1(); //输入问题
void input2();
int judge();
int judge1(int hh,int ss);
void choice(int num1);
int main()
{
printf("这是一个类似qq密码的程序。\n");
input1();
input2();
printf("请选择第一个问题:(输入1,2,3,4)");
num[0]=judge1(0,0);
choice(num[0]);
num[1]=judge1(num[0],0);
choice(num[1]);
if(c==3)
{
question=answer=(char*)malloc(3*jj*sizeof(char));
num[2]=judge1(num[0],num[1]);
choice(num[2]);
}
return 0;
}
void input1()
{
static char *totalq[jj]={"what the name of mine","who i like the most","when i first do the 1+1,it is"," yourself question"};
for(int a=1;a<4;a++)
printf("%d .%s",a,totalq+a-1);
}
viod input2()
{
int b,a;
printf("你选择几个问题(2个或3个):");
c=judge();
for(a=1,b=0;a<=4;a++,b++)
printf("预设问题:%d个是%s",a,total[b]);
}
int judge()
{ int c;
while(!scanf("%d",&c)&&(c!=2&&c!=3))
printf("请输入2或3");
return c;
}
int judge1(int hh,int ss) //判断输入1234的正确性
{
int a;
static int b=1;
while(!scanf("%d",&a))
{
if(b==1&&(strchr("1234",a)==NULL))
{printf("请输入数字1,2,3,4::");
b++;}
if(b==2&&(a!=hh&&strchr("1234",a)==NULL))
{
printf("请输入数字 :");
b++;
}
if(b==3&&(a!=hh&&a!=ss&&strchr("1234",a)==NULL))
printf("请输入其他数字");
}
return a;
}
void choice(int funny) //选择答案。
{
static int a=0;
printf("%s \n",totalq+funny-1);
if(funny==4)
{printf("输入你的问题:");
gets(question[a]);}
printf("输入你的答案:");
gets(answer[a]);
a++;
}