SET i=0;sum=0
WHILE i<N
SET sum+sum+a[i]
i=i+1
END WHILE
DISPLAY SUM
arrays given 3,1,0,6
dry run and explain what the code does

Sorry, nobody is interested in answering your little puzzle.
Do you have a Java topic we can help with?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.