Need Help With These C Homework Problems Write A For Loop That Computes The Sum

NEED HELP with these C# Homework problems.

  • Write a for loop that computes the sum of first n positive integers.  Set the variable n to 12.  Print “The sum of all integers from 0-12 is “ + sum

sum = 1 + 2 + 3 + … + n

and the second one is…..

Write a for loop that prints 1 through n, separated by commas. Example: for n = 9 print

1, 2, 3, 4, 5, 6, 7, 8, 9

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW