summaryrefslogtreecommitdiff
path: root/5p19.cpp
blob: 5d59ddb0ef7c5ff85ded1569cd654573f24543c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>

/*
 *
 * 5.19
 *
 *
 */

int main () {

	std::string keepgoing;
	do {
		std::cout << "Enter two strings" << std::endl;
		std::string s1;
		std::string s2;
		std::cin >> s1 >> s2;
		if(s1 > s2) {
			std::cout << "s1 > s2" << std::endl;
		} else if (s2 > s1) {
			std::cout << "s2 > s1" << std::endl;
		} else if (s1 == s2) {
			std::cout << "s1 == s2" << std::endl;
		}

		std::cout << "Continue?" << std::endl;
		std::cin >> keepgoing;
	} while(keepgoing == "Y" || keepgoing == "y");

	return 0;
}