>>416 普通はdouble型とか使うんだろうけど分からないので変な奴。
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
char str[BUFSIZ];int i,t;
for(;;)
{
printf("身長は(cm)?");gets(str);
i=atoi(str);
if(i>0)break;
}
t=22*i*i;
printf("理想の体重は%d.%dキログラムです\n",t/10000,t%10000/1000);
return 0;
}