0
Request the entry of a salary and the intended installment amount to be paid monthly. If the intended installment is greater than 20% of the salary, show "Loan cannot be granted". Otherwise show "Loan can be granted".
I did in portugol, but I’m not right , could help me?
Var
salario:real
pretencao:inteiro
media:real
Inicio
escreval("Entre com o salario")
leia(salario)
escreval("Pretençao de parcela")
leia(pretencao)
salario<-salario/pretencao
media<-0.02*salario
se media >salario entao
escreval("saldo liberado")
senao
escreval("nao liberado")
fimse
Guy I believe I can put what I want in writing , because it is not what is evaluated but the logic of programming, read and reflect.
– Gilson Andrade
20% would be
salario*0.2
– Sam
Because you do:
salario<-salario/pretencao
??– Andrey
One strange thing I noticed is that if the average is a percentage of the salary, it will never be higher than the salary.
– Sam
I’m also bugged rs..
– Gilson Andrade
I guess it had to be
se pretencao < media entao
– Sam