ch19_5.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:0k
源码类别:

C#编程

开发平台:

Visual C++

  1. //**********************
  2. //**    ch19_5.cpp    **
  3. //**********************
  4. #include <iostream.h>
  5. #include <iomanip.h>
  6. void fn(float interest, float amount)
  7. {
  8.   cout <<"RMB amount = "
  9.        <<setprecision(2) <<amount;
  10.   cout <<"nthe interest = "
  11.        <<setprecision(4) <<interest
  12.        <<endl;
  13. }
  14. void main()
  15. {
  16.   float f1 =29.41560067;
  17.   float f2 =12.567188;
  18.   fn(f1,f2);
  19. }