<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center"><strong>A. Petya and Strings</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"right"} -->
<p class="has-text-align-right">time limit per test:2 seconds<br>memory limit per test:256 megabytes<br>input/output :standard input /standard output</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"left"} -->
<p class="has-text-align-left">Little Petya loves presents. His mum bought him two strings of the same size for his birthday. The strings consist of uppercase and lowercase Latin letters. Now Petya wants to compare those two strings lexicographically. The letters' case does not matter, that is an uppercase letter is considered equivalent to the corresponding lowercase letter. Help Petya perform the comparison.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Input<br>Each of the first two lines contains a bought string. The strings' lengths range from 1 to 100 inclusive. It is guaranteed that the strings are of the same length and also consist of uppercase and lowercase Latin letters.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Output</strong><br>If the first string is less than the second one, print "-1". If the second string is less than the first one, print "1". If the strings are equal, print "0". Note that the letters' case is not taken into consideration when the strings are compared.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Examples</strong><br>input</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>aaaa<br>aaaA</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>output</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>0</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>input</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>abs<br>Abz</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>output</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>-1</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>input</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>abcdefg<br>AbCdEfF</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>output</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>1</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p><strong>Note</strong><br>If you want more formal information about the lexicographical order (also known as the "dictionary order" or "alphabetical order"), you can visit the following site:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>http://en.wikipedia.org/wiki/Lexicographical_order</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>#include &lt;iostream&gt;
#include &lt;cstring&gt;
#include &lt;cctype&gt;
 
using namespace std;
 
int main(){
    char str1&#91;100], str2&#91;100];
    int result;
    cin &gt;&gt; str1 &gt;&gt; str2; 
    for(int i=0;i&lt;strlen(str1);i++){
        str1&#91;i]=tolower(str1&#91;i]);
        str2&#91;i]=tolower(str2&#91;i]);
        if(str1&#91;i]&lt;str2&#91;i]){
            cout &lt;&lt; "-1";
            exit(0);
        }
        else if (str1&#91;i]&gt;str2&#91;i])
        {
            cout &lt;&lt; "1";
            exit(0);
        }
        else
        result =0;        
    }
    cout &lt;&lt; result;
      
    return 0;
}</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p><strong>Hints :</strong> In this codeforces solution my first attempt was to get the sum of ASCII value of the two strings and compare that. This would give correct result for some test cases but having different character but resulting on the same ASCII sum gives the incorrect answer then I realize on this codeforces solution i need to compare each character and the resulting ASCII value. if the value on the same position is less than the answer is different whereas if the ASCII value in the same position is same then the result is obtained. To solve all these either we need to change all the characters either to uppercase or to lowercase.</p>
<!-- /wp:paragraph -->