/* This program reads two lines from standard input, and then tests them for equality. */ #include using namespace std; int main() { string s1, s2; if (getline(cin, s1)) { // Read the two lines. if (getline (cin, s2)) { if (s1 == s2) { // Test for equality. cout << "Equal" << endl; } else { cout << "Not equal" << endl; } } } return 0; }