问答详情
源自:2-4 基本数据类型

那里错了,,,

#include <stdio.h>

int main()

{ int age;

int height;

float weight;

char isfat;

    

        age=15;

        height=162;

        weight=82.5;

        isfat= 'y';

        printf("年龄:%d 岁\n",age);

        printf("身高:%dCM\n",height);

        printf("体重:%f\n",weight);

        printf("是否属于肥胖儿童:%c",isfat);

    /*%d,%f,%c此类符号在后面会有讲解*/

    return 0;    

}


提问者:慕粉1738513843 2017-07-27 17:12

个回答

  • YetiZhang
    2017-07-27 17:34:00
    已采纳

    最后一行代码,没有回车符\n

  • Jartip
    2017-07-27 17:35:25

    我用cb跑了一下,没问题啊……

  • 我本爱兮
    2017-07-27 17:31:28

    #include <stdio.h>

    int main()

    {

        int    age = 15;

        int    height = 162;

        float    weight = 82.5;

        char    isfat = 'y';

        printf("年龄:%d 岁\n", age);

        printf("身高:%d CM\n", height);

        printf("体重:%f KG\n", weight);

        printf("是否属于肥胖儿童:%c\n", isfat); 

        /*%d,%f,%c此类符号在后面会有讲解*/

        return 0;    

    }


  • 派大星爱羊肉卷
    2017-07-27 17:30:12

    没错!!