Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int homonimos(char str1[], char str2[])
- {
- printf("Digite os nomes a comparar (separados por enter): \n");
- fgets(str1, 100, stdin);
- str1[strlen(str1)-1] = '\0';
- fgets(str2, 100, stdin);
- str2[strlen(str2)-1] = '\0';
- if(strcmp(str1, str2) == 0)
- {
- puts("Homonimos.\n");
- }
- else
- {
- puts("Nomes diferentes!\n");
- }
- }
- int main(void)
- {
- char nome1[100];
- char nome2[100];
- homonimos(nome1, nome2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement