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

#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);

#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;    


提问者:我的仰视30 2015-01-23 13:32

个回答

  • 慕函数0104069
    2018-04-24 10:43:57

    却哪儿了


  • 慕粉3444054
    2016-06-01 02:43:26

    为什么我按这个输入的 他说我缺少char?

  • Perona
    2015-12-12 23:19:50

    缺了}