+ 2

Write a code to determine sum of n natural numbera

input 5 output 1+2+3+4+5=15

9th Sep 2017, 7:18 AM
Chandra Shekhar Kumar
Chandra Shekhar Kumar - avatar
2 Answers
9th Sep 2017, 7:26 AM
Lakshay
Lakshay - avatar
+ 3
Like n consecutive natural numbers? Or can be non-consecutive too?
9th Sep 2017, 7:21 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar