想問(wèn)一下我的哪里有問(wèn)題,蟹蟹
#include <stdio.h>
int main(){
??? int age = 18;
?float height = 1.85;
?char unit = 'm';
?printf("小明今年%d 歲\n", age);
?printf("小明身高%f\n", height, unit);
?printf("小明現(xiàn)在在慕課網(wǎng)上學(xué)習(xí)IT技術(shù)%c",m);
?return 0;
}
#include <stdio.h>
int main(){
??? int age = 18;
?float height = 1.85;
?char unit = 'm';
?printf("小明今年%d 歲\n", age);
?printf("小明身高%f\n", height, unit);
?printf("小明現(xiàn)在在慕課網(wǎng)上學(xué)習(xí)IT技術(shù)%c",m);
?return 0;
}
2020-01-16
舉報(bào)
2020-01-17
printf("小明身高%f\n", height, unit);-->printf("小明身高%f%c",height,unit);有2個(gè)需要輸出的量,你只寫(xiě)了一個(gè)用于輸出的%f,沒(méi)寫(xiě)%c;
printf("小明現(xiàn)在在慕課網(wǎng)上學(xué)習(xí)IT技術(shù)%c",m); -->這里的m沒(méi)有定義,因?yàn)槟阋敵鲎址脑捫枰獙?xiě)成'm',題目沒(méi)有要求需要,想改的話printf("小明現(xiàn)在在慕課網(wǎng)上學(xué)習(xí)IT技術(shù)%c",'m');?
2020-06-05
把%c除去還有m,在%f后加上%c
2020-01-16
printf("小明身高%f%c\n", height, unit);
2020-01-16
printf("小明身高%f%c\n", height, unit);