不知道哪里錯了,輸出錯誤
#include <stdio.h>
int main()
{
? ? int age = 18;
float height = 1.85;
char unit = 'm';
printf("小明今年%d歲\n", age);
printf("小明身高%f \n", height);
printf("小明現(xiàn)在在慕課網(wǎng)上學(xué)習(xí)%c技術(shù)", unit);?
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);
printf("小明現(xiàn)在在慕課網(wǎng)上學(xué)習(xí)%c技術(shù)", unit);?
return 0;
}
2025-03-22
舉報
2025-03-25
#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("小明現(xiàn)在在慕課網(wǎng)上學(xué)習(xí)IT技術(shù)");?
return 0;
你的unit輸錯行了
2025-03-24
在%f后面加%c