#include <stdio.h>
#include <string.h>
int main(void) {
char str1[15], str2[15];
printf("Digite uma palavra de ate 10 letras: "); printf("Digite outra palavra de ate 10 letras: "); int size_str1
= strlen(str1
)-1; int size_str2
= strlen(str2
)-1; for (int i = 0; i < size_str1; i++) {
for (int j = 0; j < size_str2; j++) {
if (str1[i] == str2[j]) {
for (int k = i; k < size_str1; k++) {
str1[k] = str1[k + 1];
}
}
}
}
}
//https://pt.stackoverflow.com/q/32355/101
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KIAppbnQgbWFpbih2b2lkKSB7CiAgICBjaGFyIHN0cjFbMTVdLCBzdHIyWzE1XTsKICAgIHByaW50ZigiRGlnaXRlIHVtYSBwYWxhdnJhIGRlIGF0ZSAxMCBsZXRyYXM6ICIpOwogICAgZmdldHMoc3RyMSwgMTUsIHN0ZGluKTsKICAgIHByaW50ZigiRGlnaXRlIG91dHJhIHBhbGF2cmEgZGUgYXRlIDEwIGxldHJhczogIik7CiAgICBmZ2V0cyhzdHIyLCAxNSwgc3RkaW4pOwogICAgaW50IHNpemVfc3RyMSA9IHN0cmxlbihzdHIxKS0xOwogICAgaW50IHNpemVfc3RyMiA9IHN0cmxlbihzdHIyKS0xOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBzaXplX3N0cjE7IGkrKykgewogICAgICAgIGZvciAoaW50IGogPSAwOyBqIDwgc2l6ZV9zdHIyOyBqKyspIHsKICAgICAgICAgICAgaWYgKHN0cjFbaV0gPT0gc3RyMltqXSkgewogICAgICAgICAgICAgICAgZm9yIChpbnQgayA9IGk7IGsgPCBzaXplX3N0cjE7IGsrKykgewogICAgICAgICAgICAgICAgCXN0cjFba10gPSBzdHIxW2sgKyAxXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIHB1dHMoc3RyMSk7Cn0KCi8vaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzMyMzU1LzEwMQ==