Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int matricula;
  7.     float salariofixo,valordevenda,comissao;
  8.     system("color 0d");
  9.    
  10.    
  11.     printf("informe a matricula do vendedor:\n");
  12.     scanf("%d",&matricula);
  13.     printf("informe o salario do vendedor:\n");
  14.     scanf("%f",&salariofixo);
  15.     printf("informe o valor total de vendas por ele efetuada:\n");
  16.     scanf("%f",&valordevenda);
  17.    
  18.     comissao = valordevenda * ( valordevenda <= 1000 ? 0.3 : 0.5 );
  19.  
  20.     printf("a sua comissao eh de: %.02f\n",comissao);
  21.     system("PAUSE");
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement