diogoAlves

IFF/Introdução à Programação/Lista/15

Feb 21st, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. //IFF - Introdução à Programação
  2. //Lista de Exercícios - 15
  3. #include<stdio.h>
  4. #include<locale.h>
  5.  
  6. int main(){
  7.     setlocale(LC_ALL,"Portuguese");
  8.     float salarioFixo, valorVendido;
  9.     printf("Entre com o salário fixo e com o valor total das vendas:\nR$");
  10.     scanf("%f",&salarioFixo);
  11.     printf("R$");
  12.     scanf("%f",&valorVendido);
  13.     if (valorVendido>1500){
  14.         valorVendido-=1500;
  15.         salarioFixo+=1500*0.03+valorVendido*0.05;
  16.     }else{
  17.         salarioFixo+=valorVendido*0.03;
  18.     }
  19.     printf("O salário final será: R$%f",salarioFixo);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment