标题:这个猜数字游戏错哪里了?
取消只看楼主
逗比
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2014-10-31
结帖率:60%
 问题点数:0 回复次数:0 
这个猜数字游戏错哪里了?
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main(void)
{
   
    srand((unsigned) time(0));
    int number = rand ()%100 + 1;
    int count = 0;
    int a = 0;
    printf("请猜数字");
    scanf("%d",&a);
    count++;
    while(count = 1,count++)
    {
     if (a = number){
        printf("Bingo!");
     }
     else if (0<=a<number){
             printf("Too small,请继续猜数字\n");
     }
     else if (a>number){
             printf("Too big,请继续猜数字\n");
        }
     else{
           printf("Game Over");
     }
    }
    while(1 < count <= 3, count++)
    {
     if (a = number){
        printf("Lucky You!");
     }
     else if(0<= a < number){
             printf("Too small,请继续猜数字\n");
     }
     else if(a >= number){
            printf("Too big,请继续猜数字\n");
     }
     else{
        printf("Game Over");
     }
    }
    while(count>3,count++)
    {
     if (a = number){
        printf("Good Guess!");
     }
     else if(0 <= a < number){
            printf("Too small,请继续猜数字\n");
     }
     else if(a > number){
            printf("Too big,请继续猜数字\n");
     }
     else{
        printf("Game Over");
     }
    }
    return 0;
 }
搜索更多相关主题的帖子: include number count 游戏 
2014-11-22 20:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-439026-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.431020 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved