分类：电脑/网络-程序设计
问题：C语言：修改代码并指出我的代码中的错误#include&lt;s 
#include <std.h>#define TaxRate 5%fint main(void){  float amount,income;  printf("Enter amount: ");  scanf("%f", &amount);  income = amount * TaxRate + amount;  printf("Income(dollars): ", income);  getch();  return 0;}我的代码有问题，谁能帮我指出！谢#include <std.h>#define TaxRate 5%fint main(void){  float amount,income;  printf("Enter amount: ");  scanf("%f", &amount);  income = amount * TaxRate + amount;  printf("Income(dollars): ", income);  getch();  return 0;}我的代码有问题，谁能帮我指出！谢谢
回答：#define TaxRate 5%f 宏定义有问题#define TaxRate 5/100printf("ome(dollars): ", income);应改为printf("Income(dollars): %f", income);在文件头加一行#include <conio.h>一下为修改过的代码：#include <stdio.h>#include <conio.h>#define TaxRate 5/100int main(void){float amount,income;printf("Enter amount: ");scanf("%f", &amount);income = amount * TaxRate + amount;printf("Income(dollars): %f", income);getch();return 0;}