解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNext()){
String str1= sc.next();
String str2=sc.next();
if(str2.contains(str1))
{
System.out.print(str1+" "+"is substring of" +" "+str2);
}
else if(str1.contains(str2))
{
System.out.print(str2+" " +"is substring of"+" "+str1);
}
else
{
System.out.print("No substring");
}
}
}
}
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:552 |
C语言程序设计教程(第三版)课后习题11.5 (C语言代码)浏览:1514 |
【计算两点间的距离】 (C语言代码)浏览:879 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:373 |
A+B for Input-Output Practice (V) (C语言代码)浏览:617 |
C语言程序设计教程(第三版)课后习题6.11 (C语言代码)浏览:549 |
WU-拆分位数 (C++代码)浏览:779 |
简单的a+b (C语言代码)浏览:596 |
最小公倍数 (C语言代码)浏览:1026 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:552 |