blob: 52e5044f1940884c573c1d5aed3530f46c42a700 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <iostream>
#include <string>
using namespace std;
int main() {
string str1 = "Hello";
string str2 = "Hella";
if(str1 == str2) {
cout << str1 << " equals " << str2 << endl;
} else if(str1 < str2) {
cout << str1 << " is smaller than " << str2 << endl;
} else if(str1 > str2){
cout << str1 << " is greater than " << str2 << endl;
}
}
|