7-1 厘米换算英尺英寸PTA
1英尺=30.48cm
#include <stdio.h>
int main()
{int foot,inch;//m=(foot+inch/12)*0.3048;int m;//1英尺=30.48cm; scanf("%d",&m);foot=m/30.48;inch=(m/30.48-foot)*12;printf("%d %d",foot,inch);return 0;
}
7-1 厘米换算英尺英寸PTA
1英尺=30.48cm
#include <stdio.h>
int main()
{int foot,inch;//m=(foot+inch/12)*0.3048;int m;//1英尺=30.48cm; scanf("%d",&m);foot=m/30.48;inch=(m/30.48-foot)*12;printf("%d %d",foot,inch);return 0;
}