猜数字游戏

#include #include #include void menu()  {   printf("***********************\n");   printf("***1.play      0.exit ***\n");   printf("***********************\n");  } void game() {  int ret = 0;  int guess = 0;  ret = rand()%100+1; while(1)  {    printf ("请猜数字:>");    scanf ("%d ", &guess);    if(guess>ret)     {       printf ("猜大了\n");      }    else if (guess:");       scanf  ("%d , &input);   switch (input)     {      case 1 :       game ();       break;      case 0:       printf ("退出程序\n");       break;      default:       printf ("选择错误\n");       break;     }    }while(input); return 0; }

提供全面的网站源码正版坑位,小程序、APP、H5、支付、游戏、区块链、商城、直播、影音、小说、公众号等源码学习交流。
精品源码资源网 » 猜数字游戏
喜欢我嘛?喜欢就按“ctrl+D”收藏我吧!♡