URI Online Judge | 1009
Salário com Bônus
Adaptado por Neilor Tonin, URI
Brasil
Timelimit: 1
BrasilFaça um programa que leia o nome de um vendedor, o seu salário fixo e o total de vendas efetuadas por ele no mês (em dinheiro). Sabendo que este vendedor ganha 15% de comissão sobre suas vendas efetuadas, informar o total a receber no final do mês, com duas casas decimais.
Entrada
O arquivo de entrada contém um texto (primeiro nome do vendedor) e 2 valores de dupla precisão (double) com duas casas decimais, representando o salário fixo do vendedor e montante total das vendas efetuadas por este vendedor, respectivamente.
Saída
Imprima o total que o funcionário deverá receber, conforme exemplo fornecido.
URI Online Judge | 1009
Salary with Bonus
Adapted by Neilor Tonin, URI
Brazil
Timelimit: 1
BrazilMake 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.
#include <stdio.h>
int main() {
char primeironomedovendedor;
double A,B;
scanf("%s",&primeironomedovendedor);
scanf("%lf %lf",&A,&B);
printf("TOTAL = R$ %.2f\n",(A+B*0.15));
return 0;
}
Nenhum comentário:
Postar um comentário