C
C#2y ago
marixthorn

❔ 1-100 except 40 and 60

Hello could anyone help me make a simple code that will write out numbers 1-100 except 40 and 60 please
4 Replies
x0rld 👻 🎃
if (number != 40 || number != 60) Console.WriteLine(number)
marixthorn
marixthornOP2y ago
thanks
Google
Google2y ago
Enumerable.Range(1, 100).Except(new List<int>() { 40, 60 }).ToList().ForEach(Console.WriteLine);
Enumerable.Range(1, 100).Except(new List<int>() { 40, 60 }).ToList().ForEach(Console.WriteLine);
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server