#include <iostream>
#include <sstream>
#include <cstring>
#include <algorithm>
int main()
{
char str_[] = "axfdyjzl";
char x;
std::string not_find;
std::istringstream iss("a x b f d y m j z l");
std::cin.rdbuf(iss.rdbuf());
while (std::cin >> x)
{
std::cout << ">" << x << std::endl;
not_find = "";
if (strchr(str_, x))
{
std::cout << "strchr: " << x << std::endl;
} else {
not_find = "strchr: nie znaleziono " + std::string(1, x);
}
// https://www.asciitable.com/
// ascii a x f d y j z l
int a[8] = { 97, 120, 102, 100, 121, 106, 122, 108 };
int *it = std::find( a, a + 8, (int)x );
if (it != a + 8)
{
std::cout << "find: " << x << std::endl;
} else {
not_find += "\nfind: nie znaleziono " + std::string(1, x);
}
if (not_find != "") std::cout << not_find << std::endl;
}
return EXIT_SUCCESS;
}