欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

字符串移位包含问题c++

程序员文章站 2022-04-30 22:42:20
...

这里是引用字符串移位包含问题c++

在这里插入代码片
```#include<iostream>
#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
char s1[61],s2[61];
char a1[61],a2[61];
int a,b;
int main(){
	cin>>s1>>s2;
	if(strlen(s1)<strlen(s2)){
	    stycpy(a1,s1);
	    stycpy(s1,s2);
	    stycpy(s2,a1);}
	strcpy(a2,s1)
	if(strstr(strcat(s1,a2),s2)==NULL)
	    cout<<"Flase";
	else
	    cout<<"True"; 
return 0;   
}