/* קלט: אות אנגלית גדולה פלט: הודעה הכוללת את האות העוקבת "בצורה-מעגלית" לאות הנתונה */ using System; public class NextLetterInCircle { public static void Main() { // הצהרה על משתנים בתוכנית char letter; // אות הקלט char nextLetter; // האות העוקבת // קליטת המשתנים Console.Write("Enter a letter from the ABC: "); letter = char.Parse(Console.ReadLine()); // ההוראה לביצוע-בתנאי: חישוב האות העוקבת if (letter == 'Z') { //המקרה המיוחד – האות האחרונה nextLetter = 'A'; Console.WriteLine("Back to start: {0}", nextLetter); } // if else { // האות איננה האחרונה nextLetter = (char)(letter + 1); //המרת טיפוס (casting) Console.WriteLine("The next letter is: {0}", nextLetter); } // else } // Main } // class NextLetterInCircle