Como fazer uma função ler o retorno de outra no visualg?
//---------------------------------------------------------------------
funcao lerTotalc(): real
Var
combustiveln: real
trechototal: real
Inicio
combustiveln <- trechototal * 3.6
retorne(combustiveln)
//---------------------------------------------------------------------
funcao lerCombp(): inteiro //combustivel presente no avião
Var
combustivelp, combustiveln, totalcombustivel: inteiro
Inicio
combustiveln <- lerTotalc()
escreval("Quantos litros de combustivel já tem no avião?")
leia(combustivelp)
se combustivelp = 0 entao
totalcombustivel = combustiveln
senao
totalcombustivel <- combustiveln - combustivelp
fimse
retorne(totalcombustivel)
fimfuncao
//----------------------------------------------------------------------