#include<stdio.h> main() { float I; scanf("%f",&I); if(I<=100000) printf("%.0f\n",I*0.1); if(I>100000&&a<=200000) printf("%.0f\n",(I-100000)*0.075+10000); if(I>200000&&a<=400000) printf("%.0f\n",(I-200000)*0.05+17500); if(I>400000&&a<=600000) printf("%.0f\n",(I-400000)*0.03+27500); if(I>600000&&a<=1000000) printf("%.0f\n",(I-600000)*0.015+33500); if(I>1000000) printf("%.0f\n",(I-1000000)*0.01+39500); } /* Main.c:2:1: warning: return type defaults to 'int' main() ^ Main.c: In function 'main': Main.c:8:16: error: 'a' undeclared (first use in this function) if(I>100000&&a<=200000) ^ Main.c:8:16: note: each undeclared identifier is reported only once for each function it appears in */ |
Double click to view unformatted code.