First Blog! My most viewed Quora Post

Originally answered in Quora!. My most viewed answer. (Almost 57k+ views!!) Click to view post.
Algorithm⌗
-
Start
-
Declare a variable of type int i = 0 and sum = 0
-
Iteration, iterate variable i in a loop from 1 to 50. On each iteration increment i by 1 and add i
for i = 1 and i <= 50 { sum = sum + i increment i = i + 1 }
-
Print Sum
-
Stop
C++ Syntax⌗
Cheers!
Pic Credits: Photo by Aperture Vintage
Read other posts