问答详情
源自:2-5 格式化输出语句

C 语言 初学者 求教

怎么输入不对啊#include

int main(){    int age = 18; float height = 1.85; char unit = 'm'; printf("age = 18:%d", age); printf("height = 1.85:%f"height,unit=m:%c, unit); printf("小明现在在慕课网上学习IT技术"); return 0; } 谁指导一下

提问者:qq_志在必行_03447997 2016-06-02 16:13

个回答

  • 越飞越高
    2016-11-08 23:31:07

    #include后面漏了头文件名<stdio.h>

    http://img.mukewang.com/5821efb80001a21004380597.jpg

  • 蒲公英wsg
    2016-06-02 22:44:37

    没输标准输入输出库<stdio.h>

  • 蒲公英wsg
    2016-06-02 22:43:26

    #include <stdio.h>

    int main()

    {    int age = 18; 

    float height = 1.85;

     char unit = 'm';

     printf("age = %d", age);

     printf("height = %f",height);

    printf("unit=m:%c", unit);


     printf("小明现在在慕课网上学习IT技术");

     return 0;

    }


  • 慕粉3447018
    2016-06-02 16:29:59

    printf("小明今年%d岁\n",age)

    print("小明身高%f%c\n",height,nuit)

    print("小明现在在慕课网上学习IT技术”)

  • 慕前端0186591
    2016-06-02 16:24:33

    #include <stdio.h>

    int main()

    {

        int age = 18;

        float = 1.85;

        char unit='m';

        printf("age =  %d:", age); 

       printf("height = %f%c:" height, unit); 

        printf("小明现在在慕课网上学习IT技术"); 

        return 0; } 

    }


  • 慕九州6130496
    2016-06-02 16:22:05

    #include<stdio.h>

    int main()

    {    int age = 18; float height = 1.85; char unit = 'm';

     printf("age = 18:%d", age);

     printf("height = %f,unit=%c",height, unit);

    printf("小明现在在慕课网上学习IT技术");

    return 0; }