Solution of URI 1009::Salary with Bonus
Before seeing the solution make sure that you have tried enough. Don’t copy the whole code, just find out the logic. If you feel any problem, you will inform me by comment.
#include<stdio.h>
#include<string.h>
int main()
{
char name[20];
double money,sale,TOTAL;
gets(name);
scanf("%lf%lf",&money,&sale);
TOTAL = (0.15*sale)+money;
printf("TOTAL = R$ %.2lf\n",TOTAL);
return 0;
}
No comments