int a = 2033;
int b = 3044;
float c = (float) ( a * 100 / b) / 100;
int count = c * 100;
printf("pecent:%0.2f\n", c);
printf("count:%d\n", count);
c计算百分百比
最新推荐文章于 2023-02-10 18:35:36 发布
int a = 2033;
int b = 3044;
float c = (float) ( a * 100 / b) / 100;
int count = c * 100;
printf("pecent:%0.2f\n", c);
printf("count:%d\n", count);