public static void Main()
Console.WriteLine("Write a coded sentence");
Console.WriteLine(FirstSentence(str));
if((str.IndexOf("*,")<str.IndexOf("*."))&&(str.IndexOf("*,")!=-1)&&(str.IndexOf("*.")!=-1))
str=str.Substring(str.IndexOf("*,")+2);
str=str.Substring(str.IndexOf("*.")+2);
public static string DeleteDouble(string str)
while(str.IndexOf("**")!=-1)
str_new=str_new+str.Substring(0,str.IndexOf("**")+1);
str=str.Substring((str.IndexOf("**"))+2);
public static string FirstSentence(string str)
if((str.IndexOf("*,")<str.IndexOf("*."))&&(str.IndexOf("*,")!=-1)&&(str.IndexOf("*.")!=-1))
sent=str.Substring(0,str.IndexOf("*,"));
sent=str.Substring(0,str.IndexOf("*."));