Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <ctype.h>
- int main()
- {
- char str1[100];
- char str2[100];
- gets(str1);
- scanf("%s", str2);
- int flag;
- for (int i = 0; str1[i] != '\0'; i++)
- {
- flag = 1;
- for (int j = 0; str2[j] != '\0'; j++)
- {
- if ('A' <= str1[i] && str1[i] <= 'Z')
- {
- str1[i] = str1[i] + 32;
- }
- if ('A' <= str2[j] && str2[j] <= 'Z')
- {
- str2[i] = str2[i] + 32;
- }
- if (str1[i] != str2[j])
- {
- flag = 0;
- break;
- }
- i++;
- }
- if (flag == 1)
- {
- break;
- }
- }
- if (flag == 1)
- {
- printf("Yes\n");
- }
- else
- {
- printf("No\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement