domingo, 21 de maio de 2017

URI PROBLEMA 1009 - Salário com Bônus EM C

URI Online Judge | 1009

Salário com Bônus

Adaptado por Neilor Tonin, URI  Brasil
Timelimit: 1
Faç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
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.






#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

URI PROBLEMA 1133 - Resto da Divisão SOLUÇÃO EM C

URI Online Judge | 1133 Resto da Divisão Adaptado por Neilor Tonin, URI   Brasil Timelimit: 1 Escreva um programa que leia 2 valo...