#Incorrect Output Confusion

18 messages · Page 1 of 1 (latest)

odd hound
#

I don't understand how my output is not correct

chilly deltaBOT
#

This post has been reserved for your question.

Hey @odd hound! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

errant pasture
#

What would be correct, if this isn't?

odd hound
#

it doesnt tell me

#

i dont understand why its flawed

#

total = 0
for i = 1: total = 0 + 1 = 1
for i = 2: total = 1 + 2 = 3
for i = 3: total = 3
for i = 4: total = 3 + 4 = 7
for i = 5: total = 7 + 5 = 12
for i = 6: total = 12
for i = 7: total = 12 + 7 = 19
final value = 19

#

I did this too so i dont understand whays wrong

errant pasture
#

So you're being told that your output is incorrect, but you're not told what would be the correct output?

odd hound
#

ik the screenshot says 4 but i did 3 and its still wrong

errant pasture
#

And what are the instructions?

odd hound
#

do the output

#

find*

#

idk why its in that format i dont see any {

errant pasture
#

So, you walked upon a stone on which was written "do the output"
And your first reflex was that it was a command to write a Java program, but you feel that it isn't correct?

odd hound
#

nvm i found the issue

#

i didnt know why the code was formatted like that