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

这道题怎么做?

#include <stdio.h>

int main(){

    int age = 18;

float height = 1.85;

char unit = 'm';

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

printf("小明身高%f%c\n", height, unit);

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

return 0;

}


提问者:慕雪6253084 2017-07-06 18:00

个回答

  • 慕沐1541899
    2017-08-01 14:00:23

    #include <stdio.h>

    int main(){

        int age = 18;

    float height = 1.85;

    char unit = 'm';

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

    printf("小明身高%f%c\n",height, unit);

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

    return 0;

    }


  • 慕标1082451
    2017-07-06 18:36:05

    #include <stdio.h>

    int main(){

        int age = 18;

    float height = 1.85;

    char unit = 'm';

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

    printf("小明身高%f%c\n", height, unit);

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

    return 0;

    }

    直接提交233