Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- d. real : receita_total, parafuso_venda, quantidade, custo_unit, custo_fixo
- tela"entre com a quantidade de parafusos"
- ler quantidade
- custo_total = (custo_unit * quantidade) + custo_fixo
- tela custo_total
- receita_total = parafuso_venda * quantidade
- tela receita_total
- se (receita_total - custo_total < 0)
- tela "houve prejuizo"
- se nao
- tela "teve-se lucro"
- --
- #include <stdio.h>
- int main(){
- float receita_total, parafuso_venda = 1.50, quantidade, custo_unit = 0.50, custo_fixo = 600;
- printf("Entre com a quantidade de parafusos\n");
- scanf("%f",&quantidade);
- custo_total = (custo_unit * quantidade) + custo_fixo;
- printf("O custo total e: %f", custo_total);
- receita_total = parafuso_venda * quantidade;
- printf("A receita e: %f", receita_total);
- if(receita_total - custo_total < 0){
- printf("Houve prejuizo\n");
- }
- else{
- printf("Houve lucro\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement