/* קלט: תו המזהה חיה ותוצאת ריצתה למאה מטרים פלט: הודעה המציינת אם החיה מהירה או לא */ using System; public class AnimalOlympics { public static void Main() { // הצהרה על משתנים בתוכנית char animalType; int scoreInSeconds; const int DEER_LIMIT = 10; const int TURTLE_LIMIT = 600; // קליטת המשתנים Console.Write("Enter the animal type – D for a deer and T for a turtle: "); animalType = char.Parse(Console.ReadLine()); Console.Write("Enter the animal score in seconds: "); scoreInSeconds = int.Parse(Console.ReadLine()); if (animalType == 'D') // אם צבי { if (scoreInSeconds <= DEER_LIMIT)// האם מהיר לפי ההגדרה המתאימה לצבי Console.WriteLine("The deer is fast"); else Console.WriteLine("The deer is not fast"); } // if animalType else // צב { if (scoreInSeconds <= TURTLE_LIMIT) // האם מהיר לפי ההגדרה המתאימה לצב Console.WriteLine("The turtle is fast"); else Console.WriteLine("The turtle is not fast"); } // else animalType }//Main }// class AnimalOlympics