Solution
sum <-- 0;
index <-- 1;
while index <= N do
sum <-- sum + values[index ];
index <-- index + 1;
end while
print sum;
Subscribe to:
Post Comments (Atom)
This blog contains questions and answers from real interviews including Google and Microsoft.
No comments:
Post a Comment