[solved]-Write Program Uses Function Sum Int Takes Argument Positive Integer N Returns Sum First N Q39035847
Write a program that uses a function sum(int) that takes as anargument a positive integer n and returns the sum of the first npositive integers. Use a while loop. Then write a recursivefunction that performs the same task. MY MAIN QUESTION IS if Can wefurther optimize the code?
Expert Answer
Answer to Write a program that uses a function sum(int) that takes as an argument a positive integer n and returns the sum of the … . . .
OR

