#include <stdio.h>
int main( )
{
const int lol[ ] = { 10920 , 11129 } ;
char secret[ ] = "hi" ;
char answer[ ] = "__" ;
int o_o = 2 ;
for ( int i = 0 ; i < 7 ; ++ i)
{
printf ( "Enter a letter. %s\n " , answer
) ;
if ( ! ( lol[ 0 ] + guess* ( guess - ( lol[ 1 ] - lol[ 0 ] ) ) ) )
{
answer[ guess - secret[ 0 ] ] = secret[ guess - secret[ 0 ] ] ;
o_o -= 1 ;
}
else
{
printf ( "Letter not found, try again\n " ) ; }
if ( ! o_o)
{
break ;
}
}
printf ( "The word was %s\n " , secret
) ; return 0 ;
}
CiNpbmNsdWRlIDxzdGRpby5oPgoKaW50IG1haW4oKQp7CiAgICBjb25zdCBpbnQgbG9sW10gPSB7MTA5MjAsIDExMTI5fTsKICAgIGNoYXIgc2VjcmV0W10gPSAiaGkiOwogICAgY2hhciBhbnN3ZXJbXSA9ICJfXyI7CiAgICBpbnQgb19vID0gMjsKCiAgICBmb3IgKGludCBpID0gMDsgaSA8IDc7ICsraSkKICAgIHsKICAgICAgICBwcmludGYoIkVudGVyIGEgbGV0dGVyLiAlc1xuIiwgYW5zd2VyKTsKICAgICAgICBpbnQgZ3Vlc3MgPSBnZXRjaGFyKCk7CiAgICAgICAgZ2V0Y2hhcigpOwoKICAgICAgICBpZighKGxvbFswXSArIGd1ZXNzKihndWVzcyAtIChsb2xbMV0tbG9sWzBdKSkpKQogICAgICAgIHsKICAgICAgICAgICAgYW5zd2VyW2d1ZXNzIC0gc2VjcmV0WzBdXSA9IHNlY3JldFtndWVzcyAtIHNlY3JldFswXV07CiAgICAgICAgICAgIG9fbyAtPSAxOwogICAgICAgIH0KICAgICAgICBlbHNlCiAgICAgICAgewogICAgICAgICAgICBwcmludGYoIkxldHRlciBub3QgZm91bmQsIHRyeSBhZ2FpblxuIik7CiAgICAgICAgfQoKICAgICAgICBpZiAoIW9fbykKICAgICAgICB7CiAgICAgICAgICAgIHByaW50ZigiWW91IHdpblxuIik7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgIH0KCiAgICBwcmludGYoIlRoZSB3b3JkIHdhcyAlc1xuIiwgc2VjcmV0KTsKICAgIHJldHVybiAwOwp9Cg==