【无标题】代码运行一半就不运行了

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("在一个月黑风高的夜晚,");
    printf("一个小男孩用自己的积蓄买了一束花。\n");
    printf("(以下是小女生问,男生答)\n");
    printf("小女生,你这花多少钱一束啊?\n");
    printf("小男生:");
    double flowerprice;//鲜花的价格
    scanf("%lf\n",&flowerprice);
    //小女生的想法
    printf("小女生想:");
    if (flowerprice > 9999)
    {
        printf("亲爱的明天我们就结婚吧!\n");
    }
    else if (flowerprice > 1000 && flowerprice <= 9999  )
    {
        printf("你真好,亲亲嘴!\n");
    }
    else if (flowerprice > 500 && flowerprice <= 1000  )
    {
        printf("你真好,拉拉手!\n");
    }
    else if (flowerprice > 100 && flowerprice <= 500 )
    {
        printf("明天在见吧!\n");
    }
    else
    {
        printf("呸,穷鬼!\n");
    }
    /*************************************************
    if (flowerprice > 9999)
    {
        printf("明天就结婚!\n");
    }

    else if (flowerprice > 1000 && flowerprice <= 9999)
    {
        printf("拉拉手吧!\n");
    }

    else if (flowerprice > 500 && flowerprice <= 999)
    {
        printf("明天再约吧!\n");
    }
    else
    {
        printf("呸!\n");
    }

    *************************************************/
    return 0;
}

这段代码的执行结果是: 

只能执行到录入花的价格,之后的条件完全无法执行,而且这套语句完全是跟进视频的老师敲出来的,  完全没有报错,哪位大神路过看到帮忙解释一下,谢谢

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值