所以,我正在阅读C prog。书,我读了这个练习:
Write a program which asks the user to enter a dollars-and-cents amount, then displays the amount with 5% added?
解决方案 :
#include <stdio.h>
int main(void) {
float original_amount;
printf("Enter an amount: ");
scanf("%f", &original_amount);
printf("With tax added: $%.2f\n", original_amount * 1.05f);
return 0;
}
我知道是什么.3f
意思(后面应该有 3 个数字……),但这是什么1.05f
意思?