厘米换算英尺英寸(15)

#include <stdio.h>
int main() 
{
	int n;
	int a,b;
	float t;
	while(scanf("%d",&n)!=EOF)
	{
		t=(float)n/30.48;
		a=(int)t;
		t=t-a;
		b=(int)(t*12);
		printf("%d %d
",a,b);
	}
	return 0;
}

原文地址:https://www.cnblogs.com/abc-24990/p/4257517.html