#include
intmain()
{
inta;
intfoot,inch;
scanf("%d",&a);
foot=(int)(0.01*a/0.3048);
inch=(int)(12*(0.01*a/0.3048-(double)foot));
printf("%d%d",foot,inch);
return0;
}
扩展资料
C数据类型长度操作
#include
void main(void)
{
char x = 'a';
char *p = "abcd";
char y[4] = {'a','b','c','d'};
int a = 10;
int *b = &a;
int c[4] = {1,2,3,4};
printf("%d,%d,%d\n",sizeof(x),sizeof(p),sizeof(y));
printf("%d,%d,%d\n",sizeof(a),sizeof(b),sizeof(c));
system("pause");
}