Skip to content

Commit d84820e

Browse files
committed
Create petya_and_strings112A.cpp
1 parent d2aab79 commit d84820e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

petya_and_strings112A.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include <iostream>
2+
#include <string>
3+
#include<algorithm>
4+
5+
using namespace std;
6+
7+
int main() {
8+
string str;
9+
string str2;
10+
11+
transform(str.begin(),str.end(),str.begin(), :: tolower);
12+
transform(str2.begin(),str2.end(),str2.begin(), :: tolower);
13+
if(str < str2)
14+
{
15+
cout << -1;
16+
}
17+
else if(str > str2)
18+
{
19+
cout << 1;
20+
}
21+
else{
22+
cout << 0;
23+
}
24+
return 0;
25+
}
26+
27+

0 commit comments

Comments
 (0)