SlideShare uma empresa Scribd logo
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

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 Hubspot
Marius 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 ChatGPT
Expeed 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 Engineerings
Pixeldarts
 
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
ThinkNow
 
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
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
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
Neil 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 2024
Albert 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 Insights
Kurio // 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 2024
Search 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 summary
SpeakerHub
 
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 Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit 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 management
MindGenius
 
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