Posts by Eduardo D. Oliveira • 67 points
3 posts
-
1
votes1
answer70
viewsQ: Factor numbers from 1 to 9, accumulating variable printing wrong number
Why my accumulator variable does not print 6? acum=1 n1=6 for i=1,2,3 do if n1%2==0 then acum=acum*2 n1=n1/2 elseif n1%3==0 then acum=acum*3 n1=n1/3 elseif n1%5==0 then acum=acum*5 n1=n1/5 elseif…
luaasked Eduardo D. Oliveira 67 -
4
votes1
answer73
viewsQ: What error in while loop? moon turn on
What’s the error in the loop? I wrote this code to print the sum of the first 10 prime numbers, I’ve reviewed the loops but I couldn’t find the error. It was to print the sum of the cousins until 29…
-
1
votes1
answer62
viewsQ: Because "my program" did not increase the value 5 being that it less than 5.5
I’m starting in programming and always trying to figure out the things that are not clear, so far I managed, but this one I tried and tried and I can not understand why the program did not increase…
javaasked Eduardo D. Oliveira 67