Problem:https://www.urionlinejudge.com.br/judge/en/problems/view/1009
Solution:First I thought it is about gross margin but after searching in net i have come to the point that it is not about this but it is very simple…I am sharing this now
Here two hints for the solution of this problem
1.Your functionary wins 15% over all products sold
that means you have to multiply with 15 with sold products and divide by 100 as here is percentage
2.Final or Total salary means that you have to add salary i give to him(my employee)+15% of solded products because functionary means employee and he wins 15% of all solded products
That’s all so code is here..
#include<iostream> #include<cstdio> int main() { char employee; double salary,sold,total; scanf("%s %lf %lf",&employee,&salary,&sold); total=salary+(sold*15)/100; printf("TOTAL = R$ %.2f\n",total); return 0; }