Page 1 of 1

C# Language Write a program that asks the user to enter a positive integer, and then uses a for loop to compute the sum

Posted: Fri Jul 01, 2022 5:42 am
by answerhappygod
C# Language
Write a program that asks the user to enter a positive integer,and then uses a for loop to compute the sum of all theintegers between 1 and the integer given by the user. Forinstance, if the user enters 5, your program shoulddisplay 15 on the screen(i.e., 1 + 2 + 3 + 4 + 5 = 15).
Once you are done, modify your original program in these tworespects: