Created
July 21, 2016 16:23
-
-
Save luiseduardohd/9b2e115d246c4877f14715d2197b81ff to your computer and use it in GitHub Desktop.
Wizeline interview problem
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
using System; | |
namespace TestWize | |
{ | |
class MainClass | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine("Hello World!"); | |
DoWizeline(); | |
} | |
public static void DoWizeline() | |
{ | |
for (int i = 1; i <= 100; i++) | |
{ | |
bool wize = i % 3 == 0; | |
bool line = i % 5 == 0; | |
if (wize && line) | |
Console.WriteLine("Wizeline"); | |
else if (wize) | |
Console.WriteLine("Wize"); | |
else if (line) | |
Console.WriteLine("line"); | |
else | |
Console.WriteLine(i); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment