/******************************************************/ /* Introduction to Programming */ /* By Dr. ANTF */ /* www.antf.net */ /* Copyright 2015 */ /* */ /* C# 301 - Loops (b) */ /******************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DOS { class Program { static void Main(string[] args) { int i; for (i = 0; i < 5; i++) { Console.WriteLine("A"); if (i == 2) break; Console.WriteLine("B"); Console.WriteLine("\n"); } Console.WriteLine("i = {0}", i); Console.ReadKey(); } } }