using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
//write your name and save into variable
string name = "Adeel Ahmad";
//count the words in my name
char[] nameCharacters =name.ToCharArray();
int wordCount = 0;
for(int c=0;c<nameCharacters.Length;c++){
if(nameCharacters[c] == ' '){
wordCount++;
}
}
Console.WriteLine("Your name contain " +(wordCount + 1)+ " words.");
//count the characters in my name
int alphabatCount = 0;
for(int c=0;c<nameCharacters.Length;c++){
if(nameCharacters[c] != ' '){
alphabatCount++;
}
}
Console.WriteLine("Your name contain " +(alphabatCount)+ "
characters.");
//write the first letter of each word
List<char> firstLetters = new List<char>();
int index =0;
for(int c=0;c<nameCharacters.Length;c++){
if(nameCharacters[c] == ' '){
index = c + 1;
continue;
}
if(c==index){
firstLetters.Add(nameCharacters[c]);
}
}
for(int r=0;r<firstLetters.Count;r++){
Console.WriteLine("Your name word " + r + " first letter is "
+firstLetters[r]);
}
}
}