0
I have a small question about portugol. The question asks these details:
Above R $ 400,00
30% of the average balance
R$ 400,00 (inclusive) up to R$ 300,00
25 % of the average balance
R$ 300,00 (inclusive) up to R$ 200,00
20% of the average balance
Up to R $ 200,00
10% of the average balance.
My code went like this:
funcao inicio()
{
real saldo,credito
escreva("Digite seu saldo médio: ")
leia(saldo)
se(saldo>400){credito=0.30 escreva("Seu saldo é de: R$",saldo,"\nSeu bonus é de: R$",(saldo*credito),"\nValor total: R$",(saldo*credito+saldo))}
se(saldo=400 e saldo=>300){credito=0.25 escreva("Seu saldo é de: R$",saldo,"\nSeu bonus é de: R$",(saldo*credito),"\nValor total: R$",(saldo*credito+saldo))}
se(saldo=300 e saldo=>200){credito=0.20 escreva("Seu saldo é de: R$",saldo,"\nSeu bonus é de: R$",(saldo*credito),"\nValor total: R$",(saldo*credito+saldo))}
se(saldo=200){credito=0.10 escreva("Seu saldo é de: R$",saldo,"\nSeu bonus é de: R$",(saldo*credito),"\nValor total: R$",(saldo*credito+saldo))}
}
Whenever I try to run the program it says that the expression has not been started correctly, any suggestions about? Thanks for your attention since.
Change:
se(saldo=400 e saldo=>300){
forse(saldo<=400 e saldo=>300){
. Idemse
where he wrote only=
. The use of the clausesenão
at the controlsse
could facilitate your testing.– anonimo
I tried your tip but I’m still the same, the program says the error is on the line
se(saldo<=400 e saldo=>300){
I will try to talk to my teacher to seek out how I was supposed to do. Thank you from my heart for your help.– SmileCraby_Gamer