xxxxxxxxxx
// i was too lazy to install a chrome extenstion or open paint
// this is a good wbsite
// just upload the img
https://imagecolorpicker.com/en
xxxxxxxxxx
public static void FizzBuzz(int n)
{
for (var i = 0; i <= n; ++i)
{
var res = i switch
{
var x when is5(x) && is3(x) => "FizzBuzz",
var x when is5(x) => "Fizz",
var x when is3(x) => "Buzz",
_ => i.ToString()
};
Console.WriteLine(res);
}
static bool is3(int x)
{
return x % 3 == 0;
}
static bool is5(int x)
{
return x % 5 == 0;
}
}
xxxxxxxxxx
<script src="https://cdn.jsdelivr.net/npm/spectrum-colorpicker2/dist/spectrum.min.js">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/spectrum-colorpicker2/dist/spectrum.min.css">