#include<stdio.h>
#include<locale.h>
#include<time.h>
#include<stdlib.h>
#include<string.h>
int main ( )
{
int i, len_palavra;
char lacuna[ 20 ] = "_" ;
char letra;
char palavra[ ] = "arroz" ;
len_palavra
= strlen ( palavra
) ; for ( i= 1 ; i< len_palavra; i++ )
lacuna[ i] = '_' ;
while ( strcmp ( palavra
, lacuna
) != 0 ) {
printf ( "\n Digite uma letra: " ) ;
for ( i= 0 ; i< len_palavra; i++ )
{
if ( letra == palavra[ i] )
lacuna[ i] = letra;
}
}
return 0 ;
}
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8bG9jYWxlLmg+CiNpbmNsdWRlPHRpbWUuaD4KI2luY2x1ZGU8c3RkbGliLmg+CiNpbmNsdWRlPHN0cmluZy5oPgoKaW50IG1haW4gKCkKewogICAgaW50IGksbGVuX3BhbGF2cmE7CiAgICBjaGFyIGxhY3VuYVsyMF09Il8iOwogICAgY2hhciBsZXRyYTsKICAgIGNoYXIgcGFsYXZyYVtdPSJhcnJveiI7CgogICAgc2V0bG9jYWxlKExDX0FMTCwiUE9SVFVHVUVTRSIpOwoKICAgIGxlbl9wYWxhdnJhID0gc3RybGVuKHBhbGF2cmEpOwogICAgZm9yKGk9MTsgaTxsZW5fcGFsYXZyYTsgaSsrKQogICAgICAgIGxhY3VuYVtpXT0nXyc7CgogICAgd2hpbGUgKHN0cmNtcChwYWxhdnJhLGxhY3VuYSkgIT0gMCkKICAgIHsKICAgICAgICBzeXN0ZW0oImNscyIpOwogICAgICAgIHByaW50ZigiXHRcdCVzXG4iLGxhY3VuYSk7CiAgICAgICAgcHJpbnRmKCJcbkRpZ2l0ZSB1bWEgbGV0cmE6ICIpOwogICAgICAgIHNjYW5mKCIlYyIsJmxldHJhKTsKCiAgICAgICAgZm9yKGk9MDsgaTxsZW5fcGFsYXZyYTsgaSsrKQogICAgICAgIHsKICAgICAgICAgICAgaWYgKGxldHJhID09IHBhbGF2cmFbaV0pCiAgICAgICAgICAgICAgICBsYWN1bmFbaV0gPSBsZXRyYTsKICAgICAgICB9CiAgICB9CiAgICAKICAgIHByaW50ZigiXHRcdCVzXG4iLGxhY3VuYSk7CiAgICByZXR1cm4gMDsKfQo=