这是pta上的一题
# include<stdio.h>
int main(void)
{
int salary_h=0;
unsigned int year=0;
unsigned int hours=0;
float salary=0;
scanf("%u %u",&year,&hours);
if(year<5)
{
salary_h=30;
}
else {salary_h=50;
}
if(hours<=40)
{
salary=salary_h*hours;
}
else
{
salary=1.5*salary_h*(hours-40) + salary_h*40;
}
printf("%.2f",salary);
return 0;
}