Что означает {0} при выводе? - C#
Формулировка задачи:
Что означает {0} при выводе?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Задание_2__Вариант_4_
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Введите строку:");
string a = Console.ReadLine();
string[] slov = a.Split(' ', '.', ',', '!', ':');
int count = 0;
int length = 3;
foreach (string word in slov)
if (word.Length == length) count++;
if (count > 0)
Console.WriteLine("Количество слов из 3 букв в данной строке = {0}",
length, count);
else Console.WriteLine("Нет слов из 3 букв в данной строке!");
Console.ReadLine();
}
}
}Решение задачи: «Что означает {0} при выводе?»
textual
Листинг программы
Console.WriteLine("Количество слов из 3 букв в данной строке = {0}", count);