int的取值范围才-32768到36767吧
#include<stdio.h>
main()
{ float n;
printf("input one float number:");
scanf("%f",&n);
n=n*100;
printf("%f%%\n",n);
}
#include <stdio.h> int main(void) { double ldv_in; int liv_ans; scanf("%lf", &ldv_in); liv_ans = (int)((ldv_in + 0.0051) * 100);//四舍五入 printf("%d%%", liv_ans); return 0; }