Question
petya and strings codeforces solution in C
#include<stdio.h> int main() { int a,i; char s1[101]; char s2[101]; gets(s1); gets(s2); strlwr(s1); strlwr(s2); int l=strcmp(s1,s2); printf("%d\n",l); return 0; }
Codeforces 112A. Petya and Strings Solution in CPP
#include <iostream> #include <cstring> #include <cctype> using namespace std; int main() { string s1, s2; getline(cin, s1); getline(cin, s2); for (int i = 0; i < s1.length(); i++) { s1[i] = tolower(s1[i]); } for (int i = 0; i < s2.length(); i++) { s2[i] = tolower(s2[i]); } int result = s1.compare(s2); cout << result << endl; return 0; }
Tags
codeforces petya and strings solution,codeforces petya and string solution,petya and strings,codeforces,codeforces petya and string,petya and string solution in c,petya and string solution codeforces,122a petya and string solution in c,codeforces petya and string solution in c,petya and string solution codeforces in c,petya and string codeforces solution in c,petya and string codeforces solution in c++,codeforces petya and strings,codeforces solution