Skip to content

Instantly share code, notes, and snippets.

@jeffersonchaves
Created November 9, 2021 17:57
Show Gist options
  • Save jeffersonchaves/84f5182d14d6108df3672292f0e80efd to your computer and use it in GitHub Desktop.
Save jeffersonchaves/84f5182d14d6108df3672292f0e80efd to your computer and use it in GitHub Desktop.
programa
{
funcao inicio()
{
inteiro tamanho_tabua = 5
inteiro tamanho_tabua_cm = tamanho_tabua * 100
inteiro tamanho_pedaco_cm = 45
inteiro numero_pedacos = 0
inteiro desperdicio = 0
numero_pedacos = tamanho_tabua_cm / tamanho_pedaco_cm
desperdicio = tamanho_tabua_cm % tamanho_pedaco_cm
escreva("Serão obtidos com uma madeira de ",tamanho_tabua ," metros ", numero_pedacos, " pedaços de madeira.\n\n")
escreva("Sobrarão ", desperdicio ," cm de madeira")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment