Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IFF - Introdução à Programação
- //Lista de Exercícios - 15
- #include<stdio.h>
- #include<locale.h>
- int main(){
- setlocale(LC_ALL,"Portuguese");
- float salarioFixo, valorVendido;
- printf("Entre com o salário fixo e com o valor total das vendas:\nR$");
- scanf("%f",&salarioFixo);
- printf("R$");
- scanf("%f",&valorVendido);
- if (valorVendido>1500){
- valorVendido-=1500;
- salarioFixo+=1500*0.03+valorVendido*0.05;
- }else{
- salarioFixo+=valorVendido*0.03;
- }
- printf("O salário final será: R$%f",salarioFixo);
- }
Advertisement
Add Comment
Please, Sign In to add comment