2、请设计一个程序,程序包括下列功能:(1) 让用户依次输入两个字符串s1和s2; (2) 比较两个

发布时间:2021-02-25 17:14:39

2、请设计一个程序,程序包括下列功能:(1) 让用户依次输入两个字符串s1和s2; (2) 比较两个字符串的长度(2) 比较两个字符串的长度并显示比较结果;(3) 判断s1与s2有没有长度在 3个字符以上的相同子串,显示判断结果.

网友回答

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace parestringandsubstring
{ public partial class Form1 : Form
{ public Form1()
{ InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{ string strsmall=,strbig,sub=;
SortedList substring = new SortedList();
if ((textBox1.Text.Length
以上问题属网友观点,不代表本站立场,仅供参考!