20 lines
559 B
Text
20 lines
559 B
Text
import system'routines;
|
|
import extensions;
|
|
|
|
public Program()
|
|
{
|
|
auto elements := new object[]{
|
|
KeyValue.new("Krypton", 83.798r),
|
|
KeyValue.new("Beryllium", 9.012182r),
|
|
KeyValue.new("Silicon", 28.0855r),
|
|
KeyValue.new("Cobalt", 58.933195r),
|
|
KeyValue.new("Selenium", 78.96r),
|
|
KeyValue.new("Germanium", 72.64r)};
|
|
|
|
var sorted := elements.sort::(former,later => former.Key < later.Key );
|
|
|
|
sorted.forEach::(element)
|
|
{
|
|
Console.printLine(element.Key," - ",element)
|
|
}
|
|
}
|