added new exo

This commit is contained in:
didier amyot committed 2023-08-21 10:06:31 -04:00
1 parent c17800f71a
commit 22c72c3c8d
2 files changed
+40 -4

No files matched your search

+11 -4
View File
@@ -4,12 +4,19 @@ using System;
class EntryPoint{
class EntryPoint
{
public static void Main(String[] args){
public static void Main(String[] args)
{
Console.WriteLine(TriangleExercice.BuildTriangle(6) );
IntChainLink lastLink = new IntChainLink(3);
IntChainLink secondLink = new IntChainLink(2, lastLink);
IntChainLink firstLink = new IntChainLink(1, secondLink);
Console.WriteLine(firstLink.Head()); // 1
Console.WriteLine(firstLink.Rest().Head()); // 2
Console.WriteLine(firstLink.Rest().Rest().Head()); // 3
}
}