using System.Collections.Generic;
using System.Threading.Tasks;
public static int Add(this int value, int valueToAdd) => value + valueToAdd;
public string MakeSound() => "woof";
public string MakeSound() => "meow";
public Dictionary<string, double> bitcoin { get; set; }
public override bool Equals(object value) => value is Fish;
public static async Task Main()
Console.WriteLine("Task 1");
var dt = new DateTime(2023, 12, 31, 23, 59, 59, 222);
Console.WriteLine(dt.ToString("yyyy-MM/dd HH:mm:ss--fff"));
Console.WriteLine("\nTask 2");
Console.WriteLine(pct.ToString("P2"));
Console.WriteLine("\nTask 3");
var words = new string[] { "You","can","catch","more","flies","with","honey","than","you","can","with","vinegar" };
Console.WriteLine(string.Join(" ", words));
Console.WriteLine("\nTask 4");
var alphabet = new string[] { "b","c","e","f","a","d" };
Console.WriteLine(string.Join("|", alphabet.OrderByDescending(a => a)));
Console.WriteLine("\nTask 5");
Console.WriteLine("Dog: " + dog.MakeSound());
Console.WriteLine("Cat: " + cat.MakeSound());
Console.WriteLine("\nTask 6");
var wordsToFilter = new string[] { "jumps", "sump", "amps", "alps", "hill", "halls", "smith" };
var filteredWords = wordsToFilter.Where(w => !(w.Contains("m") || (w.EndsWith("s") && !w.StartsWith("a"))));
Console.WriteLine(string.Join("\n", filteredWords));
Console.WriteLine("\nTask 7");
Console.WriteLine("\nTask 8");
var client = new RestClient("https://api.coingecko.com");
var result = await client.GetJsonAsync<RestResult>("/api/v3/simple/price?ids=bitcoin&vs_currencies=zar");
Console.WriteLine(result.bitcoin["zar"].ToString("### 000.00"));
Console.WriteLine("\nTask 9");
var dolphin = new Dolphin();
Console.WriteLine(dolphin.Equals(fish).ToString());