功能描述:
(1)运行会提示:你想猜测几位数字,可以是1~10位数字;
(2)输入的每个数字之间应有空格分开;程序会提示你相应位置的数字是猜对,还是猜大了还是猜小了。
(3)共有10次的机会;
(4)读者可根据需要,自己去添加功能;
/*
*Data:2017.3.25
*Author:LXG
*Function: Guess_Game
*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include <time.h>
void GuessGame(int n)
{
int var[10],usr[10]; //数组usr用来存放用户输入的数字
int i,k;