一道简单的c 问题
程序代码:
main() { float a,b; printf("Enter a dollor amount: \n); scanf("%.2f",&a); b = a*(1.0+0.005); printf ("With a tax added : %.2f\n",b); }题目是要求用户输入一个美金数量,然后显示出加了5%税率的相应金额,格式如下:
Enter a dollor amount: 100.00
With a tax added : 105.00