Find the number of "well formed" words(or strings) of a given length(wordlen) which consisted of alphabets(a to z). The number of consecutive words that can occur in a well formed string must not exceed a given value
Answers
Answered by
0
Explanation:
The program as per given requirements mention above can be ;
Program code
Int main (char arr[], int wordlen)
{
int consecutive ;
Int count;
for (i=0; i < wordlen; i ++)
{
if ( arr[i] >= a or arr[i] <= z )
if ( arr[i] == arr[i+1])
consecutive++
else
count++
if (consecutive > 5)
break
}
Return count
Similar questions
Science,
5 months ago
Computer Science,
5 months ago
Social Sciences,
5 months ago
Hindi,
11 months ago
English,
11 months ago
Chemistry,
1 year ago
India Languages,
1 year ago