0
Does anyone know how to write coding for this problem using c or java
Input: S1="every morning I want to do exercise regularly" S2="every morning I want to do meditation without fail" S3="it is important I want to be happy always" Output: I want to
2 ответов
+ 3
Sathish ,
i think this kind of task is called: find a "common consecutive substring" in a number of n strings.
0
From s1 take every word, and check is it in s2 and s3 if yes print else do nothing..
Java has a method String.contains("string literal"); which does this job..
In C, also has, strtok() method to split string and also strsub() method to extract substring.. also check string.h library which may help you more to do that easy..