下面是用 C 语言实现求两个字符串的最长公共子串的代码:
#include<stdio.h>
#include<string.h>
#define MAX_LEN 100
int main(){
char str1[MAX_LEN], str2[MAX_LEN];
int i, j, k, len1, len2, maxLen, end;
int c[MAX_LEN][MAX_LEN];
printf("请输入第一个字符串:");
scanf("%s", str1);
printf("请输入第二个字符串:");
scanf(