Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://vk.com/evgenykravchenko0
- ___ ___ ___
- / /\ ___ / /\ / /\
- / /:/_ /__/\ / /:/_ / /:/_
- / /:/ /\ \ \:\ / /:/ /\ / /:/ /\
- / /:/ /:/_ \ \:\ / /:/_/::\ / /:/ /:/_
- /__/:/ /:/ /\ ___ \__\:\ /__/:/__\/\:\ /__/:/ /:/ /\
- \ \:\/:/ /:/ /__/\ | |:| \ \:\ /~~/:/ \ \:\/:/ /:/
- \ \::/ /:/ \ \:\| |:| \ \:\ /:/ \ \::/ /:/
- \ \:\/:/ \ \:\__|:| \ \:\/:/ \ \:\/:/
- \ \::/ \__\::::/ \ \::/ \ \::/
- \__\/ ~~~~ \__\/ \__\/
- ___
- /__/\ ___ ___
- \ \:\ / /\ / /\
- \ \:\ / /:/ / /:/
- _____\__\:\ /__/::\ /__/::\
- /__/::::::::\ \__\/\:\__ \__\/\:\__
- \ \:\~~\~~\/ \ \:\/\ \ \:\/\
- \ \:\ ~~~ \__\::/ \__\::/
- \ \:\ /__/:/ /__/:/
- \ \:\ \__\/ \__\/
- \__\/
- #include <stdio.h>
- int position_words (char firstword[10000], char secondword[10000])
- {
- int i;
- int count = 0;
- for (i = 0; i < 10000; i++)
- {
- if (firstword[i] != secondword[i] && firstword[i] >= 'A' && firstword[i] <= 'z' && secondword[i] >= 'A' && secondword[i] <= 'z')
- count++;
- if (firstword[i] == ' ' && secondword[i] == ' ')
- break;
- }
- if (count == 0)
- printf("Отличий нет");
- return count;
- }
- int main()
- {
- char firstword[10000];
- char secondword[10000];
- printf("Введите первое слово : ");
- scanf("%s", firstword);
- printf("Введите первое слово : ");
- scanf("%s", secondword);
- if (position_words(firstword, secondword) > 0)
- printf("Слова отличаются в %d позициях(Регистр букв включается) \n ", position_words(firstword, secondword));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement