Of course, does not display! You need concatenation: "Новое А: "+a .
static void Main(string[] args) { try { Console.Write("Введите А: "); string a = Console.ReadLine(); Console.Write("Введите Б: "); string b = Console.ReadLine(); string c = b; b = a; a = c; Console.WriteLine("Новое А: "+a); Console.WriteLine("Новое Б: "+b); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadLine(); } }
UPD
Yes, as you have already answered, you can also apply line formatting: Console.WriteLine("Новое А: {0}",a);
By the way, two lines of output can be replaced by one. Then it will be easier for you to understand the essence of formatting strings; the essence of concatenation.
Formatting:
Console.WriteLine("Новое А: {0}\nНовое Б: {1}",a,b);
Concatenation:
Console.WriteLine("Новое А: "+a+"\nНовое Б: "+b);