Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- URL DE EXERCICIOS
- https://forum.imasters.com.br/topic/505362-exercicios-resolvidos-vai-quebrar-seu-galho/
- ______________________________________________________
- Estrutura inicial
- algoritmo "nomeAlgoritmo"
- var
- //variaveis
- inicio
- //blockcode
- fimalgoritmo
- ________________________________________________________
- Procedimento
- algoritmo "nomeProcedimento"
- var
- //variaveis
- //------------------------------------------
- //procedimento nomeProcedimento(<parametros>)
- procedimento nomeProcedimento
- //Variaveis internas
- inicio
- //blockcode
- fimprocedimento
- //-----------------------------------------
- inicio
- //blockcode
- fimalgoritmo
- ________________________________________________________
- Função
- #sem parametros
- Funcao nomeFuncao: <tipo de retorno>
- var
- //variaveis internas
- inicio
- //blockcode
- retorne //algumavariavel
- fimfuncao
- #com parametros
- Funcao nomeFuncao (nomeParametro: <tipo da variavel>): <tipo de retorno>
- inicio
- //blockcode
- retorne <tipo da variavel>
- fimfuncao
- ________________________________________________________
- tipos de váriavel
- real
- inteiro
- caractere
- logico
- matriz
- nomeVariavel <- matriz[0..N] de <tipo de variavel>
- vetor
- nomeVariavel <- matriz[0..N] de <tipo de variavel>
- atribuição de variaveis
- nomeVariavel <- <valor>
- nomeVariavel[<posicao>] <- <valor>
- ______________________________________________
- SAIDA
- escreval()
- ENTRADA
- leia()
- _______________________________________________
- CONDICIONAL
- Se <condicional> Entao
- //block code
- Senao
- //block code
- Fimse
- ________________________________________________
- ESTRUTURA DE REPETIÇÃO
- //FOR
- Para <variavel> de <valor inicial> ate <valor final> faca
- //blockCode
- Fimpara
- //While
- enquanto <expressao> faca
- //blockCode
- fimenquanto
- ________________________________________________
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement