标题:为什么编好的程序一执行就停止工作?求解惑
取消只看楼主
墨落成白
Rank: 1
等 级:新手上路
帖 子:46
专家分:4
注 册:2014-3-16
结帖率:70%
 问题点数:0 回复次数:0 
为什么编好的程序一执行就停止工作?求解惑
# include <stdio.h>
int main()
{
    int n, u, i, m;
    printf("=== This is a Number Guess Game ===\n");
    printf("Please input a Password:\n");scanf("%d",&u);   
    if(u != 765){for(i=3; i>1; )
    {
        --i;printf("This Password is wrong, you just have %d times to input again\n", i);
        scanf("%d",&u);
    }
    return 0;
    }else
    {
    do{printf("please input a number between 1 to 100 !:\n");
    scanf("%d",m);printf("Your input number is %d\n", m);}while(m>=1 && m<=100);
    if(m>=50 && m<60)printf("Sorry,Only a little smaller! Press any key to try again!\n");
    else if(m>60 && m<=70)
        printf("Sorry,Only a little bigger! Press any key to try again!\n");
    else if(m>=40 && m<50)
        printf("Small! Press any key to try again!\n");
    else if(m>70 && m<=80)
        printf("Big! Press any key to try again!\n");
    else if(m>=1 && m<40)
        printf("Too Small! Press any key to try again!\n");
    else if(m>80 && m<=100)
        printf("Too Bigger! Press any key to try again!\n");
    else if(m=60)printf("OK! You are right! Bye Bye!\n");
    }
}
搜索更多相关主题的帖子: between include please number return 
2014-03-16 14:48



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




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

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