这个怎么做

来源:2-4 基本数据类型

慕粉8578495

2018-03-09 18:06

#include <stdio.h>
int main()
{
        age = 15;
        height = 162;
        weight = 82.5;
        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;   
}

写回答 关注

3回答

  • qq_長樂_0
    2018-03-09 23:53:54
    已采纳

    就是 你要认真的看旁边的知识点 整数型就用int 浮点型 也就是带有小数点的用float 然后是一个字母的就用chart

    每次写程序都要进行分类定义变量  

  • 慕函数2757139
    2018-03-09 18:24:31

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

  • 慕无忌9941574
    2018-03-09 18:21:53

    int age = 15;
    int height = 162;
    float weight = 82.5;
    char isfat = 'y';

C语言入门

C语言入门视频教程,带你进入编程世界的必修课-C语言

926866 学习 · 21068 问题

查看课程

相似问题