#include <stdio.h>
#include <stdlib.h>
int main()
{
int inch; float centimeter;
printf("please enter inch.\n");
scanf("%d", &inch);
inch = centimeter * 2.54;
printf("The inches you enter are equal to %.2f centimeters");
system("pause");
return 0;
}
输出结果是-1.#R这种乱码值,是不是声明类型,转换说明没用对啊?