Lösningsförslag till uppgift 3.12¶
Console.WriteLine("Hur många datorer äger du?");
int antal = int.Parse(Console.ReadLine());
string datorOrd = antal == 1 ? "dator" : "datorer";
Console.WriteLine($"Du äger {antal} {datorOrd}.");
Console.WriteLine("Hur många datorer äger du?");
int antal = int.Parse(Console.ReadLine());
string datorOrd = antal == 1 ? "dator" : "datorer";
Console.WriteLine($"Du äger {antal} {datorOrd}.");