2-3、厘米换算英尺英寸 question: answer: #include <stdio.h> int main() { int cm = 0; scanf("%d",&cm); int foot = cm / 30.48;//仅c语言无需强制类型转换 int inch = ((cm / 30.48) - foot)*12;//(cm / 30.48)实际结果为浮点数,并非整数 // float inch = (cm / 30.48) - foot; printf("%d %d",foot,inch); return 0; }