using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TTest
{
class Sjx
{
static void Main(string[] args)
{
string []s=new string[5];
Console.WriteLine("输入5个字符串数组");
for (int i = 0; i < s.Length; i++)
{
s[i] = Console.ReadLine();
}
Console.WriteLine("////////////////////");
for (int i = 0; i < s.Length; i++)
{
for (int j = 0; j < s[i].Length; j++)
{
if (s[i][j].Equals('c'))
{
Console.WriteLine(s[i]);
break;
}
}
}
Console.ReadKey();
}
}
}
public class CompareTest
{ static void Main()
{
string[] s = new string[5];
for (int i = 0; i < s.Length; i++)
{
s[i] = Console.ReadLine();
} //检查是否包含“s“:
Console.WriteLine("输出结果:");
foreach (var item in s)
{
if (item.IndexOf('c') >= 0 || item.IndexOf('C')>=0)
{
Console.WriteLine(item);
}
}
}}