Created
March 19, 2021 11:32
-
-
Save h4r7w3l1/b974678c7d5e75ef3716704819d53639 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<int> numList = new List<int>{1, 2, 4, 5, 12, 55}; | |
int theSum = 0; | |
foreach(int i in numList) | |
{ | |
theSum = theSum + i; | |
System.Console.WriteLine($"{i.ToString()} > {theSum.ToString()}"); | |
} | |
System.Console.WriteLine("Total: "+theSum.ToString()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment