#include <iostream>
#include <string>
using namespace std;
int main( )
{
string sNum1;
string sWord = "Este texto contem gabriel = 1.73,derp = 1.80, essa foi uma busca." ;
string nomeProcurado;
int iPosInicial, iTam;
cout << "\n Texto Inicial: " << sWord << "\n " ;
cout << "\n String a ser procurada: " ;
cin >> nomeProcurado;
iPosInicial = sWord.find ( nomeProcurado) ;
cout << "Digite o novo valor: " ;
cin >> sNum1;
iTam = nomeProcurado.length ( ) ;
sWord.replace ( iPosInicial+ iTam+ 3 ,4 , sNum1) ;
cout << "\n Texto Alterado: " << sWord << "\n " ;
return 0 ;
}
CiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPHN0cmluZz4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKCXN0cmluZyBzTnVtMTsKCXN0cmluZyBzV29yZCA9ICJFc3RlIHRleHRvIGNvbnRlbSBnYWJyaWVsID0gMS43MyxkZXJwID0gMS44MCwgZXNzYSBmb2kgdW1hIGJ1c2NhLiI7CglzdHJpbmcgbm9tZVByb2N1cmFkbzsKCWludCBpUG9zSW5pY2lhbCwgaVRhbTsKCgljb3V0IDw8ICJcblRleHRvIEluaWNpYWw6ICIgPDwgc1dvcmQgPDwgIlxuIjsKCgljb3V0IDw8ICJcblN0cmluZyBhIHNlciBwcm9jdXJhZGE6ICI7CgljaW4gPj4gbm9tZVByb2N1cmFkbzsKCWlQb3NJbmljaWFsID0gc1dvcmQuZmluZChub21lUHJvY3VyYWRvKTsKCgljb3V0IDw8ICJEaWdpdGUgbyBub3ZvIHZhbG9yOiAiOwoJY2luID4+IHNOdW0xOwoKCWlUYW0gPSBub21lUHJvY3VyYWRvLmxlbmd0aCgpOwoKCXNXb3JkLnJlcGxhY2UoaVBvc0luaWNpYWwraVRhbSszLDQsIHNOdW0xKTsKCgljb3V0IDw8ICJcblRleHRvIEFsdGVyYWRvOiAiIDw8IHNXb3JkIDw8ICJcbiI7CgoJcmV0dXJuIDA7Cn0K