SlideShare uma empresa Scribd logo
1 de 6
5) Algoritmo Compra 
Variaveis 
x, y, morango, maca, kilo, total, totald, totalf: real 
Inicio 
escreva ("Digite o peso do morango: ") 
leia(x) 
escreva ("Digite o peso da maçã: ") 
leia(y) 
kilo<- x+y 
se(kilo < 5) entao 
morango<- 2.50*x 
maca<- 1.80*y 
total<- morango+maca 
escreva ("A compra adquirida foi de morango: ", x, " maçã: ", y) 
escreva ("Totalizando num valor de R$: ", total) 
senao(kilo >= 5 < 8) 
morango<- 2.20*x 
maca<- 1.50*y 
total<- morango+maca 
escreva ("A compra adquirida foi de morango: ", x, " maçã: ", y) 
escreva ("Totalizando num valor de R$: ", total) 
se(kilo >= 8) ou (total >= 25.00)entao 
totald<- total*10/100 
totalf<- total-totald 
escreva ("Você ganhou um desconto de 10%: ", totald) 
escreva ("O valor final da compra é de: ", totalf) 
senao 
fimse 
fimse 
fimalgoritmo 
14) Algoritmo Carro 
Variaveis 
Sal, com, out, result: real 
carro: inteiro 
Inicio 
escreva ("Digite o salário: ") 
leia(sal)
escreva ("Digite a quantidade de carros vendidos: ") 
leia(carro) 
escreva ("Digite a comissão por cada carro que será vendido ") 
leia (com) 
result <- (carro * com) 
out <- (sal + (result * 1.05)) 
escreva ("O salário mensal é de: ", out) 
fimalgoritmo 
15) Algoritmo Posto 
Variaveis 
x, y, alcool, gasolina, litro, total, pg, pa: real 
Inicio 
escreva ("Digite a quantidade de litros de álcool: ") 
leia(x) 
escreva ("Digite a quantidade de litros de gasolina: ") 
leia(y) 
escreva ("Digite o preço do álcool: ") 
leia(pa) 
escreva ("Digite o preço da gasolina: ") 
leia(pg) 
se(litro <= 20) entao 
alcool<- (pa * (x * 0.97)) 
gasolina<- (pg * (y * 0.96)) 
total<- alcool + gasolina 
escreva ("O valor foi de R$: ", total) 
fimse 
se(litro >= 20) entao
alcool<- (pa * (x * 0.95)) 
gasolina<- (pg * (y * 0.94)) 
total<- alcool + gasolina 
escreva ("O valor foi de R$: ", total) 
fimse 
fimalgoritmo 
17) Algoritmo Km/L 
Variaveis 
km, litro, result: real 
Inicio 
escreva ("Digite a quantidade de litros: ") 
leia(litro) 
escreva ("Digite a quilometragem: ") 
leia(km) 
result <- km / litro 
se(result <= 5) entao 
escreva ("O consumo do carro é ruim ") 
fimse 
se (result >= 5) e (result <= 8) entao 
escreva ("O consumo do carro é razoável ") 
fimse 
se (result >= 8) e (result <= 11) entao 
escreva ("O consumo do carro é bom ") 
fimse 
se (result >= 11) e (result <= 14) entao 
escreva ("O consumo do carro é ótimo ")
fimse 
se(result >= 14) entao 
escreva ("O consumo do carro é excelente ") 
fimse 
fimalgoritmo 
19) Algoritmo Salario 
Variaveis 
sal1, sal2, sal3, sal4: real 
Inicio 
escreva ("Escreva o salário 1: ") 
leia (sal1) 
escreva ("Escreva o salário 2: ") 
leia (sal2) 
escreva ("Escreva o salário 3: ") 
leia (sal3) 
escreva ("Escreva o salário 4: ") 
leia (sal4) 
se (sal1 > sal2) e (sal2 > sal3) e (sal3 > sal4) entao 
escreva ("O maior salário é o: ", sal1) 
fimse 
se (sal2 > sal1) e (sal1 > sal3) e (sal3 > sal4) 
escreva ("O maior salário é o: ", sal2) 
fimse 
se (sal3 > sal1) e (sal1 > sal2) e (sal2 > sal4) entao 
escreva ("O maior salário é o: ", sa3) 
fimse
se (sal4 > sal2) e (sal2 > sal3) e (sal3 > sal1) entao 
escreva ("O maior salário é o: ", sal4) 
fimse 
fimalgoritmo
se (sal4 > sal2) e (sal2 > sal3) e (sal3 > sal1) entao 
escreva ("O maior salário é o: ", sal4) 
fimse 
fimalgoritmo

Mais conteúdo relacionado

Último

Pesquisa de satisfação - Encontro Fazemos Acontecer
Pesquisa de satisfação - Encontro Fazemos AcontecerPesquisa de satisfação - Encontro Fazemos Acontecer
Pesquisa de satisfação - Encontro Fazemos AcontecerMarina Evangelista
 
Imóvel do Banco, Apartamento T5 com Sótão; Bank Property, Apartment near Cent...
Imóvel do Banco, Apartamento T5 com Sótão; Bank Property, Apartment near Cent...Imóvel do Banco, Apartamento T5 com Sótão; Bank Property, Apartment near Cent...
Imóvel do Banco, Apartamento T5 com Sótão; Bank Property, Apartment near Cent...imostorept
 
Digitalização do varejo | Tecnologia na gestão do negócio: como alavancar a e...
Digitalização do varejo | Tecnologia na gestão do negócio: como alavancar a e...Digitalização do varejo | Tecnologia na gestão do negócio: como alavancar a e...
Digitalização do varejo | Tecnologia na gestão do negócio: como alavancar a e...E-Commerce Brasil
 
Cavaleiros do Futebol: Equipamentos e Moda para Campeões.pptx
Cavaleiros do Futebol: Equipamentos e Moda para Campeões.pptxCavaleiros do Futebol: Equipamentos e Moda para Campeões.pptx
Cavaleiros do Futebol: Equipamentos e Moda para Campeões.pptxEduardoRodriguesOliv2
 
Digitalização do varejo | A importância do engajamento e fidelização de clien...
Digitalização do varejo | A importância do engajamento e fidelização de clien...Digitalização do varejo | A importância do engajamento e fidelização de clien...
Digitalização do varejo | A importância do engajamento e fidelização de clien...E-Commerce Brasil
 
b2ee375d-671f-406c-8c60-df328a75e662.pdf
b2ee375d-671f-406c-8c60-df328a75e662.pdfb2ee375d-671f-406c-8c60-df328a75e662.pdf
b2ee375d-671f-406c-8c60-df328a75e662.pdfRenandantas16
 
Digitalização do varejo| Clienting no varejo: dados e tendências sobre relaci...
Digitalização do varejo| Clienting no varejo: dados e tendências sobre relaci...Digitalização do varejo| Clienting no varejo: dados e tendências sobre relaci...
Digitalização do varejo| Clienting no varejo: dados e tendências sobre relaci...E-Commerce Brasil
 

Último (7)

Pesquisa de satisfação - Encontro Fazemos Acontecer
Pesquisa de satisfação - Encontro Fazemos AcontecerPesquisa de satisfação - Encontro Fazemos Acontecer
Pesquisa de satisfação - Encontro Fazemos Acontecer
 
Imóvel do Banco, Apartamento T5 com Sótão; Bank Property, Apartment near Cent...
Imóvel do Banco, Apartamento T5 com Sótão; Bank Property, Apartment near Cent...Imóvel do Banco, Apartamento T5 com Sótão; Bank Property, Apartment near Cent...
Imóvel do Banco, Apartamento T5 com Sótão; Bank Property, Apartment near Cent...
 
Digitalização do varejo | Tecnologia na gestão do negócio: como alavancar a e...
Digitalização do varejo | Tecnologia na gestão do negócio: como alavancar a e...Digitalização do varejo | Tecnologia na gestão do negócio: como alavancar a e...
Digitalização do varejo | Tecnologia na gestão do negócio: como alavancar a e...
 
Cavaleiros do Futebol: Equipamentos e Moda para Campeões.pptx
Cavaleiros do Futebol: Equipamentos e Moda para Campeões.pptxCavaleiros do Futebol: Equipamentos e Moda para Campeões.pptx
Cavaleiros do Futebol: Equipamentos e Moda para Campeões.pptx
 
Digitalização do varejo | A importância do engajamento e fidelização de clien...
Digitalização do varejo | A importância do engajamento e fidelização de clien...Digitalização do varejo | A importância do engajamento e fidelização de clien...
Digitalização do varejo | A importância do engajamento e fidelização de clien...
 
b2ee375d-671f-406c-8c60-df328a75e662.pdf
b2ee375d-671f-406c-8c60-df328a75e662.pdfb2ee375d-671f-406c-8c60-df328a75e662.pdf
b2ee375d-671f-406c-8c60-df328a75e662.pdf
 
Digitalização do varejo| Clienting no varejo: dados e tendências sobre relaci...
Digitalização do varejo| Clienting no varejo: dados e tendências sobre relaci...Digitalização do varejo| Clienting no varejo: dados e tendências sobre relaci...
Digitalização do varejo| Clienting no varejo: dados e tendências sobre relaci...
 

Destaque

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

60590123 portugol

  • 1. 5) Algoritmo Compra Variaveis x, y, morango, maca, kilo, total, totald, totalf: real Inicio escreva ("Digite o peso do morango: ") leia(x) escreva ("Digite o peso da maçã: ") leia(y) kilo<- x+y se(kilo < 5) entao morango<- 2.50*x maca<- 1.80*y total<- morango+maca escreva ("A compra adquirida foi de morango: ", x, " maçã: ", y) escreva ("Totalizando num valor de R$: ", total) senao(kilo >= 5 < 8) morango<- 2.20*x maca<- 1.50*y total<- morango+maca escreva ("A compra adquirida foi de morango: ", x, " maçã: ", y) escreva ("Totalizando num valor de R$: ", total) se(kilo >= 8) ou (total >= 25.00)entao totald<- total*10/100 totalf<- total-totald escreva ("Você ganhou um desconto de 10%: ", totald) escreva ("O valor final da compra é de: ", totalf) senao fimse fimse fimalgoritmo 14) Algoritmo Carro Variaveis Sal, com, out, result: real carro: inteiro Inicio escreva ("Digite o salário: ") leia(sal)
  • 2. escreva ("Digite a quantidade de carros vendidos: ") leia(carro) escreva ("Digite a comissão por cada carro que será vendido ") leia (com) result <- (carro * com) out <- (sal + (result * 1.05)) escreva ("O salário mensal é de: ", out) fimalgoritmo 15) Algoritmo Posto Variaveis x, y, alcool, gasolina, litro, total, pg, pa: real Inicio escreva ("Digite a quantidade de litros de álcool: ") leia(x) escreva ("Digite a quantidade de litros de gasolina: ") leia(y) escreva ("Digite o preço do álcool: ") leia(pa) escreva ("Digite o preço da gasolina: ") leia(pg) se(litro <= 20) entao alcool<- (pa * (x * 0.97)) gasolina<- (pg * (y * 0.96)) total<- alcool + gasolina escreva ("O valor foi de R$: ", total) fimse se(litro >= 20) entao
  • 3. alcool<- (pa * (x * 0.95)) gasolina<- (pg * (y * 0.94)) total<- alcool + gasolina escreva ("O valor foi de R$: ", total) fimse fimalgoritmo 17) Algoritmo Km/L Variaveis km, litro, result: real Inicio escreva ("Digite a quantidade de litros: ") leia(litro) escreva ("Digite a quilometragem: ") leia(km) result <- km / litro se(result <= 5) entao escreva ("O consumo do carro é ruim ") fimse se (result >= 5) e (result <= 8) entao escreva ("O consumo do carro é razoável ") fimse se (result >= 8) e (result <= 11) entao escreva ("O consumo do carro é bom ") fimse se (result >= 11) e (result <= 14) entao escreva ("O consumo do carro é ótimo ")
  • 4. fimse se(result >= 14) entao escreva ("O consumo do carro é excelente ") fimse fimalgoritmo 19) Algoritmo Salario Variaveis sal1, sal2, sal3, sal4: real Inicio escreva ("Escreva o salário 1: ") leia (sal1) escreva ("Escreva o salário 2: ") leia (sal2) escreva ("Escreva o salário 3: ") leia (sal3) escreva ("Escreva o salário 4: ") leia (sal4) se (sal1 > sal2) e (sal2 > sal3) e (sal3 > sal4) entao escreva ("O maior salário é o: ", sal1) fimse se (sal2 > sal1) e (sal1 > sal3) e (sal3 > sal4) escreva ("O maior salário é o: ", sal2) fimse se (sal3 > sal1) e (sal1 > sal2) e (sal2 > sal4) entao escreva ("O maior salário é o: ", sa3) fimse
  • 5. se (sal4 > sal2) e (sal2 > sal3) e (sal3 > sal1) entao escreva ("O maior salário é o: ", sal4) fimse fimalgoritmo
  • 6. se (sal4 > sal2) e (sal2 > sal3) e (sal3 > sal1) entao escreva ("O maior salário é o: ", sal4) fimse fimalgoritmo