How to use % in Portugol

Asked

Viewed 11,063 times

2

I have the following question:

Write an algorithm that calculates a worker’s salary. The user will be asked for the value of the hour worked, number of hours and the % INSS discount. At the end, print the employee’s net wage.

  • 1

    you either the percentage or the module % ?

  • Possible duplicate of Doubt in Calculus of %

  • Thanks @jbueno. I met the stack yesterday by the podcast Hipster Ponto Tech. Anyway, thanks for the link to Topico.

  • You’re welcome, young man. welcome.

  • It seems that my interpretation that was a percentage problem is correct. But the question was about mathematics, or Portugol? I answered about Portugol because it was the tag asked in the question and was in the title.

  • @bigown on portugol itself, however it was agreed rule of logic multiplier.

Show 1 more comment

2 answers

5


In any mathematical calculation to use the "percentage" just follow the logic of multiplying the desired value by the number of the percentage divided by 100.

Example: 15% of 200,00:
200 * (15 / 100) 200 * 0,15 30,00

Can be applied to any language.

  • Thanks Leonardo. Very useful information.

4

Browser other questions tagged

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