Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Problem: on_off
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here for (int i = 0; i <= 100; i++) { if (i % 3 == 0 && i % 5 == 0) { Console.Write("OnOFF"); } else if (i % 5 == 0) { Console.Write("Off"); } else if (i % 3 == 0) { Console.WriteLine("On"); } else { Console.Write(i +" "); } } Console.ReadLine(); } } }
run
|
edit
|
history
|
help
0
convert a string of numbers to a list then use a forEach to loop through the list
Bubble Sort
Problem Name_single_digi
two words are anagrams
sdfrgthyjukiujyht5r4der
Enum, TryParse, cast to enum
Sample
The modifier 'private' is not valid for this item
0/1 Knapsack problem using Iterative Approach
PassByValue vs PassByRerefence