Count chars in "practice".
Ready — edit the code above and click Run.
using System;
class Program
{
static void Main()
{
string s = "practice";
int len = 0; foreach (var _ in s) len++;
Console.WriteLine(len);
}
}
Try solving on your own first, then reveal the official answer.
Manual length count.