Search This Blog

Friday, 21 August 2020

compair == using this

 #include<iostream>

using namespace std;

int main()


{

string str1,str2;

cout<<"Enter the first string:";

getline(cin,str1);

cout<<"Enter the second string:";

getline(cin,str2);

if(str1==str2)

{

cout<<"strring are equal.";

}

else

{

cout<<"string are not equal.";

}

return 0;

}


No comments:

Post a Comment

Search This Blog

Contact Form

Name

Email *

Message *

Popular Posts