aboutsummaryrefslogtreecommitdiffstats
path: root/C++/smalltest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'C++/smalltest.cpp')
-rw-r--r--C++/smalltest.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/C++/smalltest.cpp b/C++/smalltest.cpp
new file mode 100644
index 0000000..52e5044
--- /dev/null
+++ b/C++/smalltest.cpp
@@ -0,0 +1,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;
+ }
+}