2、请设计一个程序,程序包括下列功能:(1) 让用户依次输入两个字符串s1和s2; (2) 比较两个字符串的长度
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/05/17 00:09:11
2、请设计一个程序,程序包括下列功能:(1) 让用户依次输入两个字符串s1和s2; (2) 比较两个字符串的长度
(2) 比较两个字符串的长度并显示比较结果;
(3) 判断s1与s2有没有长度在 3个字符以上的相同子串,显示判断结果.
(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 comparestringandsubstring
{
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
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 comparestringandsubstring
{
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
2、请设计一个程序,程序包括下列功能:(1) 让用户依次输入两个字符串s1和s2; (2) 比较两个字符串的长度
matlab程序设计:请设计一个程序,程序包括下列功能:(1) 让用户依次输入两个字符串s1和s2;
c语言的问题编一个程序,将两个字符串s1,s2比较,如果s1>s2,输出一个正数;s1
C语言,比较两个字符串S1和S2的大小
2、下面的程序用来比较两个字符串a和b的大小,如果字符串a大于字符串b,则输出“a>b”,否则输出“ab)
matlab程序设计 请设计一个程序,程序完成下列功能:(1)让用户输入一个矩阵A;(2)在A中找出小于0的矩阵元素的位
如果,s1和s2是两个字符串,可以用库函数strcpy(s1,s2)比较这两个字符串的大小?可以吗?
输入两个字符串s1和s2,然后将s2接在s1后面,输出连接后的字符串,不可以利用库函数strcat.
两个字符串比较大小的程序C语言
判断两个字符串s1和s2长度是否相等应该使用什么函数
编写函数strcomp(s1,s2),实现两个字符串的比较,返回值为1,0,-1,分别表示s1>s2,s1=s2,s10
C语言 编写递归函数1.设计递归程序任意给定输入的一个小写英文字符串a1a2a3…an-1an (n≥5)输出:字符串A