public static void Main()
Console.Write("\n\nCount the total number of words in a string :\n");
Console.Write("------------------------------------------------------\n");
Console.Write("Input the string : ");
str = Console.ReadLine();
while (l <= str.Length - 1)
if(str[l]==' ' || str[l]=='\n' || str[l]=='\t')