Posts by João Victor Trindade • 77 points
4 posts
-
3
votes1
answer72
viewsQ: Error in calculating a PA with Haskell
The function does not return the expected result but I followed the formula and can not understand the error in logic. I hope to return the term i-th. termoPA :: Int -> Int -> Int -> Int…
-
2
votes2
answers177
viewsQ: Why can’t you access a class attribute in the inherited class?
I have this class: package auladezoitodonove; public class Conta { // atributos private int numeroConta; private String nomeCliente; private int identificador; //Construtores void Conta (){…
-
1
votes1
answer54
viewsQ: recursive function error in c++
This recursive function should calculate the multiplication of two integers but it is always returning +1 in the result, someone can help me? int multiplic(int m1, int m2){ if(m2==0){ return 1; }…
-
1
votes1
answer134
viewsQ: Why is this kind of comparison/choice wrong?
escreval("Digite o consumo") leia(consumo) escolha consumo caso <= 100 escreval("Parabéns, voce e economico") caso >=101 e <200 escreval("Cuidado com o consumo") caso >200…