重复的步骤可以合并,特殊字符输出要在前面加转义字符\,%输出用%%
#include<cstdio>
int main()
{
double a,x;
scanf("%lf",&a);
if(a<=400) x=0.15;
else if(a<=800) x=0.12;
else if(a<=1200) x=0.1;
else if(a<=2000) x=0.07;
else x=0.04;
printf("Novo salario: %.2lf\n",a*(1+x));
printf("Reajuste ganho: %.2lf\n",a*x);
printf("Em percentual: %.0lf %%\n",x*100);
return 0;
}