static void Total_words()
string str = "hrishikesh patil is working as an intern";
for (int i = 0; i < str.Length; i++)
if (str[i] == ' ' || str[i] == '\n' || str[i] == '\t')
Console.WriteLine("the total number of words in the given string is " + count);
public static void Main()