不会又是作业吧?
下面是一种解法,忘了是谁的了,反正不是我的,你参考一下吧,
希望作者不要骂我……
/******************* file.h *********************/
# include <stdio.h>
# include <stdlib.h>
# include <conio.h>
/******************* function guess() ********************/
NUMBER guess(DATA_BASE d)
{
static NUMBER number_start=0x0123;
static NUMBER number_end=0x9876;
NUMBER number, number_possible, number_best;
int E[4][10]={0};
int length=0;
float digit_chance[4][10];
float chance, chance_best;
char m,n;