How to put string and variables together in Portugol?

Asked

Viewed 6,506 times

2

Hello, I am learning English for academic purposes and I am having problems in a code I am doing.

inserir a descrição da imagem aqui

But when I run it, it rotates until it’s time to average. Then he says he hasn’t found the student variable. Beauty I took the student and did so

escreval ("sua média é " media)

It appeared that the syntax is incorrect. But I did not find on the Internet as I do to join a string and the variable in "write".

1 answer

1

Use commas to interpolate strings and variables:

escreval(aluno, ", sua média é ", media)
  • thanks! I didn’t know which syntax was correct because I was using the point to concatenate the same I do in php '-' but now I solved!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.