Code for sum of n natural numbers
AnswerBot
1y
Code for sum of n natural numbers
Use a loop to iterate from 1 to n and add each number to a sum variable
Return the sum variable
Help your peers!
Add answer anonymously...
Top Mphasis Associate Software Engineer interview questions & answers
Popular interview questions of Associate Software Engineer
Top HR questions asked in Mphasis Associate Software Engineer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app