1 /*************************************************************************
 2     > File Name: printf.c
 3     > Author: Mr.Yang
 4     > Purpose:演示printf的用法 
 5     > Created Time: 2017年05月21日 星期日 10时07分44秒
 6  ************************************************************************/
 7 
 8 #include <stdio.h>
 9 #include <stdlib.h>
10 
11 int main(void)
12 {
13         float i = 10000.123;
14 
15         printf("%5f\n",i);
16         printf("%10f\n",i);
17         printf("%15f\n",i);
18         printf("%20f\n",i);
19         printf("%25f\n",i);
20 
21         return 0;
22 }

运行结果:

10000.123047
10000.123047
   10000.123047
        10000.123047
             10000.123047

 

相关文章:

  • 2021-09-03
  • 2021-11-28
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-09-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-01-30
  • 2021-10-18
  • 2021-06-18
相关资源
相似解决方案