You are given a number n, write a function (in java programming language) that return sum of 1 no n, i.e. 1+2+3+...+n = ?
Anonymous
return n*(n+1)/2;
Check out your Company Bowl for anonymous work chats.
Copyright © 2008-2026. Indeed, Inc. "Glassdoor," "Worklife Pro," "Bowls," and logo are proprietary trademarks of Indeed, Inc.