Answer to Question #20180 in C++ for apoorva
Write a program to compare two strings for equality.
1
2012-12-06T12:10:36-0500
#include <iostream>
#include <string>
using namespace std;
int main(){
string a,b;
cout<<"Enter two strings\n";
cin>>a>>b;
if (a == b) cout<<"A and B are equal\n";
else cout<<"A and B aren't equal\n";
system("pause");
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment