URI Online Judge Solution 1009 - Brain Muscles URI 1009
URI Online Judge Solution 1009☺ Salary with Bonus ☺ URI
Online Judge Solution 1009
Before seeing the solution make sure that you
tried enough. Don’t paste the whole code, just find out the logic. If you stuck
in trouble, just inform me on comment.
 |
Add caption
|
URI Online Judge | 1009
Salary with Bonus
Make a program that reads a
seller's name, his/her fixed salary and the sale's total made by
himself/herself in the month (in money). Considering that this seller
receives 15% over all products sold, write the final salary (total) of this
seller at the end of the month , with two decimal places.
- Don’t forget to print the
line's end after the result, otherwise you will receive “Presentation Error”.
- Don’t forget the blank
spaces.
Input
The input file contains a text
(employee's first name), and two double precision values, that are the
seller's salary and the total value sold by him/her.
Output
Print the seller's total
salary, according to the given example.
|
|
Samples
Input
|
Samples
Output
|
|
JOAO
500.00
1230.30
|
TOTAL = R$ 684.54
|
PEDRO
700.00
0.00
|
TOTAL = R$ 700.00
|
MANGOJATA
1700.00
1230.50
|
TOTAL = R$ 1884.58
|
URI Solution 1009 Salary with Bonus Solution in C:
|
|
#include<stdio.h>
int
main()
{
char name;
double salary,value, TOTAL;
scanf("%s %lf
%lf",&name,&salary,&value);
TOTAL = salary+value*.15;
printf("TOTAL = R$
%.2lf\n",TOTAL);
return 0;
}
|
|
About Naeem
Techism is an online Publication that complies Bizarre, Odd, Strange, Out of box facts about the stuff going around in the world which you may find hard to believe and understand. The Main Purpose of this site is to bring reality with a taste of entertainment
0 comments:
Post a Comment