- List<int> list = new List<int>();
- while (true)
- {
- int input = Convert.ToInt32(Console.ReadLine());
- if (input == -1)
- {
- break;
- }
- list.Add(input);
- }
sum up the numbers on a list
hello a for loop code to add the total sum of this list??
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajanikant HawaldarPosted Feb 14, 2020, 5:36 AM
Siddharth GajbhiyePosted Feb 17, 2020, 10:58 PM
Bhawna TutejaPosted Feb 17, 2020, 10:31 PM
Avnish KumarPosted Feb 14, 2020, 8:22 AM
Mngaro MwazenjePosted Feb 14, 2020, 7:27 AM
Rajanikant HawaldarPosted Feb 14, 2020, 6:48 AM
Mngaro MwazenjePosted Feb 14, 2020, 6:09 AM