Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

How do I make it to where I can have the user input s1 and s2. I got the following, but I don't get the same values when I declare my variables this...

How do I make it to where I can have the user input s1 and s2. I got the following, but I don't get the same values when I declare my variables this way:

int main(){

const char *s1 ="";

  std::string input1 = s1;

  const char *s2 ="";

  std::string input2 = s2;

  std::cout << "Enter s1: ";

  std::getline(std::cin,input1);

  int length1 = input1.length();

  //std::cout << length1;

  std::cout << "Enter s2: ";

  std::getline(std::cin,input2);

  int length2 = input2.length();

  int y = LexDiff(s1,s2);

  std::cout << y;

return 0;

}

= LexComp(abc,acz) # = () - () = LexComp(abc,abz) # = () - () + = LexComp(abf,abc) # + = () - () = LexComp(abc,abc) = LexComp(ab,abc) # = () - ()+ = LexComp(abc,ab) # + = () - ()+ = LexComp(abc,abD) = LexComp(abc,abd) = LexComp(aBc,abc) # = () - ()
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question