Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please check the similarity of the code and modify the code so that it doesn't get similarity. However, the example value should be correct. Example
Please check the similarity of the code and modify the code so that it doesn't get similarity. However, the example value should be correct.
Example data
Sample Input:
asdf
ProjectNo
ElectricalEngineeringProgramming
Sample Output:
#include iostream
#include string
using namespace std;
int valuechar word
if isdigitword
return word ;
else if islowerword
return word a;
else if isupperword
return word A;
else return ;
int longestSISstring input
int length input.length;
int ad new intlength;
int MAX ;
ad;
for int i ; i length; i
adi;
for int j ; j i; j
if valueinputj valueinputi && adj adi
adi adj;
if adi MAX
MAX adi;
return MAX;
int main
string input;
cin input;
int result longestSISinput;
cout result endl;
return ;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started