计算薪水

#include

int main(int argc, const char * argv[]) {
const double RATE=8.25;
const int SDANDARD=40;
double pay=0.0;
int hours;
printf (“请输入工作时:”);
scanf ("%d",&hours);

if (hours>SDANDARD)
    pay=SDANDARD*RATE+(hours-SDANDARD)*(RATE*1.5);
else
    pay=SDANDARD*RATE;
printf("应付工资:%f\n",pay);
return 0;

}

你可能感兴趣的:(计算薪水)